Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory checked 
in at 2014-06-23 11:06:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
 and      /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libzypp"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes  2014-06-01 
18:56:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes     2014-06-23 
11:06:19.000000000 +0200
@@ -1,0 +2,20 @@
+Wed Jun 11 07:36:48 CEST 2014 - [email protected]
+
+- Patch: add isCategory/isSeverity convenience
+- If available provide info in ServiceException
+- version 14.24.0 (23)
+
+-------------------------------------------------------------------
+Wed Jun  4 11:49:32 CEST 2014 - [email protected]
+
+- Cleanup orphanded service repos on the fly (bnc#649846)
+- Service refresh must not attempt to modify plugin services
+- version 14.23.0 (23)
+
+-------------------------------------------------------------------
+Wed May 28 13:41:22 CEST 2014 - [email protected]
+
+- Fix service methods to throw ServiceException, not RepoException.
+- version 14.22.0 (22)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-14.21.0.tar.bz2

New:
----
  libzypp-14.24.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.gSvyKf/_old  2014-06-23 11:06:20.000000000 +0200
+++ /var/tmp/diff_new_pack.gSvyKf/_new  2014-06-23 11:06:20.000000000 +0200
@@ -23,7 +23,7 @@
 Summary:        Package, Patch, Pattern, and Product Management
 License:        GPL-2.0+
 Group:          System/Packages
-Version:        14.21.0
+Version:        14.24.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc

++++++ libzypp-14.21.0.tar.bz2 -> libzypp-14.24.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/VERSION.cmake 
new/libzypp-14.24.0/VERSION.cmake
--- old/libzypp-14.21.0/VERSION.cmake   2014-05-27 16:33:18.000000000 +0200
+++ new/libzypp-14.24.0/VERSION.cmake   2014-06-11 07:41:17.000000000 +0200
@@ -59,10 +59,10 @@
 #   See './mkChangelog -h' for help.
 #
 SET(LIBZYPP_MAJOR "14")
-SET(LIBZYPP_COMPATMINOR "20")
-SET(LIBZYPP_MINOR "21")
+SET(LIBZYPP_COMPATMINOR "23")
+SET(LIBZYPP_MINOR "24")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 14.21.0 (20)
+# LAST RELEASED: 14.24.0 (23)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/package/libzypp.changes 
new/libzypp-14.24.0/package/libzypp.changes
--- old/libzypp-14.21.0/package/libzypp.changes 2014-05-27 16:33:18.000000000 
+0200
+++ new/libzypp-14.24.0/package/libzypp.changes 2014-06-11 07:41:17.000000000 
+0200
@@ -1,4 +1,24 @@
 -------------------------------------------------------------------
+Wed Jun 11 07:36:48 CEST 2014 - [email protected]
+
+- Patch: add isCategory/isSeverity convenience
+- If available provide info in ServiceException
+- version 14.24.0 (23)
+
+-------------------------------------------------------------------
+Wed Jun  4 11:49:32 CEST 2014 - [email protected]
+
+- Cleanup orphanded service repos on the fly (bnc#649846)
+- Service refresh must not attempt to modify plugin services
+- version 14.23.0 (23)
+
+-------------------------------------------------------------------
+Wed May 28 13:41:22 CEST 2014 - [email protected]
+
+- Fix service methods to throw ServiceException, not RepoException.
+- version 14.22.0 (22)
+
+-------------------------------------------------------------------
 Tue May 27 16:31:21 CEST 2014 - [email protected]
 
 - Let ServiceRefresh en-/disable repos with respect to previous state 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/Patch.cc 
new/libzypp-14.24.0/zypp/Patch.cc
--- old/libzypp-14.21.0/zypp/Patch.cc   2013-03-20 09:29:30.000000000 +0100
+++ new/libzypp-14.24.0/zypp/Patch.cc   2014-06-11 07:41:17.000000000 +0200
@@ -42,63 +42,67 @@
   {}
 
   ///////////////////////////////////////////////////////////////////
-  //
-  //   Patch interface forwarded to implementation
-  //
-  ///////////////////////////////////////////////////////////////////
+
+  std::string Patch::category() const
+  { return lookupStrAttribute( sat::SolvAttr::patchcategory ); }
 
   Patch::Category Patch::categoryEnum() const
+  { return categoryEnum( category() ); }
+
+  bool Patch::isCategory( const std::string & category_r ) const
+  { return( str::compareCI( category_r, category() ) == 0 ); }
+
+  Patch::Category Patch::categoryEnum( const std::string & category_r )
   {
-    std::string cat( category() );
-    switch ( cat[0] )
+    switch ( category_r[0] )
     {
       //       CAT_YAST
       case 'y':
       case 'Y':
-       if ( str::compareCI( cat, "yast" ) == 0 )
+       if ( str::compareCI( category_r, "yast" ) == 0 )
          return CAT_YAST;
        break;
 
       //       CAT_SECURITY
       case 's':
       case 'S':
-       if ( str::compareCI( cat, "security" ) == 0 )
+       if ( str::compareCI( category_r, "security" ) == 0 )
          return CAT_SECURITY;
        break;
 
       //       CAT_RECOMMENDED
       case 'r':
       case 'R':
-       if ( str::compareCI( cat, "recommended" ) == 0 )
+       if ( str::compareCI( category_r, "recommended" ) == 0 )
          return CAT_RECOMMENDED;
        break;
       case 'b':
       case 'B':
-       if ( str::compareCI( cat, "bugfix" ) == 0 )     // rhn
+       if ( str::compareCI( category_r, "bugfix" ) == 0 )      // rhn
          return CAT_RECOMMENDED;
        break;
 
       //       CAT_OPTIONAL
       case 'o':
       case 'O':
-       if ( str::compareCI( cat, "optional" ) == 0 )
+       if ( str::compareCI( category_r, "optional" ) == 0 )
          return CAT_OPTIONAL;
        break;
       case 'f':
       case 'F':
-       if ( str::compareCI( cat, "feature" ) == 0 )
+       if ( str::compareCI( category_r, "feature" ) == 0 )
          return CAT_OPTIONAL;
        break;
       case 'e':
       case 'E':
-       if ( str::compareCI( cat, "enhancement" ) == 0 )        // rhn
+       if ( str::compareCI( category_r, "enhancement" ) == 0 ) // rhn
          return CAT_OPTIONAL;
        break;
 
       //       CAT_DOCUMENT
       case 'd':
       case 'D':
-       if ( str::compareCI( cat, "document" ) == 0 )
+       if ( str::compareCI( category_r, "document" ) == 0 )
          return CAT_DOCUMENT;
        break;
     }
@@ -106,38 +110,51 @@
     return CAT_OTHER;
   }
 
+  ///////////////////////////////////////////////////////////////////
+
   std::string Patch::severity() const
   { return lookupStrAttribute( sat::SolvAttr::severity ); }
 
   Patch::SeverityFlag Patch::severityFlag() const
+  { return severityFlag( severity() ); }
+
+  bool Patch::isSeverity( const std::string & severity_r ) const
+  { return( str::compareCI( severity_r, severity() ) == 0 ); }
+
+  Patch::SeverityFlag Patch::severityFlag( const std::string & severity_r )
   {
-    std::string sev( severity() );
-    switch ( sev[0] )
+    switch ( severity_r[0] )
     {
       case 'l':
       case 'L':
-       if ( str::compareCI( sev, "low" ) == 0 )
+       if ( str::compareCI( severity_r, "low" ) == 0 )
          return SEV_LOW;
        break;
 
       case 'm':
       case 'M':
-       if ( str::compareCI( sev, "moderate" ) == 0 )
+       if ( str::compareCI( severity_r, "moderate" ) == 0 )
          return SEV_MODERATE;
        break;
 
       case 'i':
       case 'I':
-       if ( str::compareCI( sev, "important" ) == 0 )
+       if ( str::compareCI( severity_r, "important" ) == 0 )
          return SEV_IMPORTANT;
        break;
 
       case 'c':
       case 'C':
-       if ( str::compareCI( sev, "critical" ) == 0 )
+       if ( str::compareCI( severity_r, "critical" ) == 0 )
          return SEV_CRITICAL;
        break;
 
+      case 'u':
+      case 'U':
+       if ( str::compareCI( severity_r, "unspecified" ) == 0 )
+         return SEV_NONE;
+       break;
+
       case '\0':
        return SEV_NONE;
        break;
@@ -161,12 +178,11 @@
     return std::string( "unknown" );
   }
 
+  ///////////////////////////////////////////////////////////////////
+
   std::string Patch::message( const Locale & lang_r ) const
   { return lookupStrAttribute( sat::SolvAttr::message, lang_r ); }
 
-  std::string Patch::category() const
-  { return lookupStrAttribute( sat::SolvAttr::patchcategory ); }
-
   bool Patch::rebootSuggested() const
   { return lookupBoolAttribute( sat::SolvAttr::rebootSuggested ); }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/Patch.h 
new/libzypp-14.24.0/zypp/Patch.h
--- old/libzypp-14.21.0/zypp/Patch.h    2013-03-20 09:29:30.000000000 +0100
+++ new/libzypp-14.24.0/zypp/Patch.h    2014-06-11 07:41:17.000000000 +0200
@@ -89,16 +89,29 @@
       Date timestamp() const
       { return buildtime(); }
 
+      /** \name Patch Category */
+      //@{
       /**
        * Patch category (recommended, security,...)
        */
       std::string category() const;
 
-      /** Patch category as enum of wellknown categories.
+      /** This patch's category as enum of wellknown categories.
        * Unknown values are mapped to \ref CAT_OTHER.
        */
       Category categoryEnum() const;
 
+      /** Whether this patch's category matches \a category_r */
+      bool isCategory( const std::string & category_r ) const;
+
+      /** Patch category as enum of wellknown categories.
+       * Unknown values are mapped to \ref CAT_OTHER.
+       */
+      static Category categoryEnum( const std::string & category_r );
+      //@}
+
+      /** \name Patch Severity */
+      //@{
       /**
        * Severity string as specified in metadata.
        * For use in computaions see \ref severityFlag.
@@ -111,6 +124,15 @@
        */
       SeverityFlag severityFlag() const;
 
+      /** Whether this patch's severity matches \a severity_r */
+      bool isSeverity( const std::string & severity_r ) const;
+
+      /** Severity string mapped to an enum.
+       * Unknown string values are mapped to \ref SEV_OTHER
+       */
+      static SeverityFlag severityFlag( const std::string & category_r );
+      //@}
+
       /**
        * Does the system need to reboot to finish the update process?
        */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/Product.h 
new/libzypp-14.24.0/zypp/Product.h
--- old/libzypp-14.21.0/zypp/Product.h  2014-02-14 13:52:54.000000000 +0100
+++ new/libzypp-14.24.0/zypp/Product.h  2014-06-11 07:41:17.000000000 +0200
@@ -111,8 +111,8 @@
     */
     bool isTargetDistribution() const;
 
-    /** This is \c register.target attribute of an \b installed product.
-      * Used for registration.
+    /** This is \c register.target attribute of a product.
+      * Used for registration and filtering service repos.
       */
     std::string registerTarget() const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/RepoManager.cc 
new/libzypp-14.24.0/zypp/RepoManager.cc
--- old/libzypp-14.21.0/zypp/RepoManager.cc     2014-05-27 16:33:19.000000000 
+0200
+++ new/libzypp-14.24.0/zypp/RepoManager.cc     2014-06-04 11:53:14.000000000 
+0200
@@ -247,7 +247,7 @@
     inline void assert_alias( const RepoInfo & info )
     {
       if ( info.alias().empty() )
-       ZYPP_THROW( RepoNoAliasException() );
+       ZYPP_THROW( RepoNoAliasException( info ) );
       // bnc #473834. Maybe we can match the alias against a regex to define
       // and check for valid aliases
       if ( info.alias()[0] == '.')
@@ -258,7 +258,7 @@
     inline void assert_alias( const ServiceInfo & info )
     {
       if ( info.alias().empty() )
-       ZYPP_THROW( ServiceNoAliasException() );
+       ZYPP_THROW( ServiceNoAliasException( info ) );
       // bnc #473834. Maybe we can match the alias against a regex to define
       // and check for valid aliases
       if ( info.alias()[0] == '.')
@@ -637,19 +637,52 @@
     if ( PathInfo(_options.knownReposPath).isExist() )
     {
       std::list<std::string> repoEscAliases;
+      std::list<RepoInfo> orphanedRepos;
       for ( RepoInfo & repoInfo : repositories_in_dir(_options.knownReposPath) 
)
       {
         // set the metadata path for the repo
         repoInfo.setMetadataPath( rawcache_path_for_repoinfo(_options, 
repoInfo) );
        // set the downloaded packages path for the repo
        repoInfo.setPackagesPath( packagescache_path_for_repoinfo(_options, 
repoInfo) );
-
+       // remember it
         _repos.insert( repoInfo );
+
+       // detect orphaned repos belonging to a deleted service
+       const std::string & serviceAlias( repoInfo.service() );
+       if ( ! ( serviceAlias.empty() || hasService( serviceAlias ) ) )
+       {
+         WAR << "Schedule orphaned service repo for deletion: " << repoInfo << 
endl;
+         orphanedRepos.push_back( repoInfo );
+         continue;     // don't remember it in repoEscAliases
+       }
+
         repoEscAliases.push_back(repoInfo.escaped_alias());
       }
-      repoEscAliases.sort();
+
+      // Cleanup orphanded service repos:
+      if ( ! orphanedRepos.empty() )
+      {
+       for ( auto & repoInfo : orphanedRepos )
+       {
+         MIL << "Delete orphaned service repo " << repoInfo.alias() << endl;
+         // translators: Cleanup a repository previously owned by a meanwhile 
unknown (deleted) service.
+         //   %1% = service name
+         //   %2% = repository name
+         JobReport::warning( formatNAC(_("Unknown service '%1%': Removing 
orphaned service repository '%2%'" ))
+                             % repoInfo.service()
+                             % repoInfo.alias() );
+         try {
+           removeRepository( repoInfo );
+         }
+         catch ( const Exception & caugth )
+         {
+           JobReport::error( caugth.asUserHistory() );
+         }
+       }
+      }
 
       // delete metadata folders without corresponding repo (e.g. old tmp 
directories)
+      repoEscAliases.sort();
       for ( const Pathname & cachePath : { _options.repoRawCachePath
                                         , _options.repoSolvCachePath } )
       {
@@ -881,9 +914,9 @@
     assert_urls(info);
 
     // we will throw this later if no URL checks out fine
-    RepoException rexception(_PL("Valid metadata not found at specified URL",
-                                 "Valid metadata not found at specified URLs",
-                                info.baseUrlsSize() ) );
+    RepoException rexception( info, _PL("Valid metadata not found at specified 
URL",
+                                       "Valid metadata not found at specified 
URLs",
+                                       info.baseUrlsSize() ) );
 
     // try urls one by one
     for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin(); it != 
info.baseUrlsEnd(); ++it )
@@ -979,7 +1012,7 @@
         }
         else
         {
-          ZYPP_THROW(RepoUnknownTypeException());
+          ZYPP_THROW(RepoUnknownTypeException( info ));
         }
 
         // ok we have the metadata, now exchange
@@ -1165,7 +1198,7 @@
       }
       break;
       default:
-        ZYPP_THROW(RepoUnknownTypeException( _("Unhandled repository type") ));
+        ZYPP_THROW(RepoUnknownTypeException( info, _("Unhandled repository 
type") ));
       break;
     }
     // update timestamp and checksum
@@ -1389,7 +1422,7 @@
       if ( tosave.baseUrlsSize() > 0 )
       {
         if ( probedtype == RepoType::NONE )
-          ZYPP_THROW(RepoUnknownTypeException());
+          ZYPP_THROW(RepoUnknownTypeException(info));
         else
           tosave.setType(probedtype);
       }
@@ -1535,7 +1568,7 @@
       RepoInfo todelete = *it;
       if (todelete.filepath().empty())
       {
-        ZYPP_THROW(RepoException( _("Can't figure out where the repo is 
stored.") ));
+        ZYPP_THROW(RepoException( todelete, _("Can't figure out where the repo 
is stored.") ));
       }
       else
       {
@@ -1547,7 +1580,7 @@
           if ( filesystem::unlink(todelete.filepath()) != 0 )
           {
             // TranslatorExplanation '%s' is a filename
-            ZYPP_THROW(RepoException(str::form( _("Can't delete '%s'"), 
todelete.filepath().c_str() )));
+            ZYPP_THROW(RepoException( todelete, str::form( _("Can't delete 
'%s'"), todelete.filepath().c_str() )));
           }
           MIL << todelete.alias() << " sucessfully deleted." << endl;
         }
@@ -1611,7 +1644,7 @@
 
     if (toedit.filepath().empty())
     {
-      ZYPP_THROW(RepoException( _("Can't figure out where the repo is 
stored.") ));
+      ZYPP_THROW(RepoException( toedit, _("Can't figure out where the repo is 
stored.") ));
     }
     else
     {
@@ -1724,7 +1757,7 @@
     Pathname location = service.filepath();
     if( location.empty() )
     {
-      ZYPP_THROW(RepoException( _("Can't figure out where the service is 
stored.") ));
+      ZYPP_THROW(ServiceException( service, _("Can't figure out where the 
service is stored.") ));
     }
 
     ServiceSet tmpSet;
@@ -1736,7 +1769,7 @@
       if ( filesystem::unlink(location) != 0 )
       {
         // TranslatorExplanation '%s' is a filename
-        ZYPP_THROW(RepoException(str::form( _("Can't delete '%s'"), 
location.c_str() )));
+        ZYPP_THROW(ServiceException( service, str::form( _("Can't delete 
'%s'"), location.c_str() ) ));
       }
       MIL << alias << " sucessfully deleted." << endl;
     }
@@ -2042,8 +2075,8 @@
     }
 
     
////////////////////////////////////////////////////////////////////////////
-    // save service if modified:
-    if ( serviceModified )
+    // save service if modified: (unless a plugin service)
+    if ( serviceModified && service.type() != ServiceType::PLUGIN )
     {
       // write out modified service file.
       modifyService( service.alias(), service );
@@ -2067,8 +2100,7 @@
 
     if ( service.type() == ServiceType::PLUGIN )
     {
-        WAR << "Not modifying plugin service '" << oldAlias << "'" << endl;
-        return;
+      ZYPP_THROW(ServicePluginImmutableException( service ));
     }
 
     const ServiceInfo & oldService = getService(oldAlias);
@@ -2076,7 +2108,7 @@
     Pathname location = oldService.filepath();
     if( location.empty() )
     {
-      ZYPP_THROW(RepoException( _("Can't figure out where the service is 
stored.") ));
+      ZYPP_THROW(ServiceException( oldService, _("Can't figure out where the 
service is stored.") ));
     }
 
     // remember: there may multiple services being defined in one file:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/ZYppCallbacks.h 
new/libzypp-14.24.0/zypp/ZYppCallbacks.h
--- old/libzypp-14.21.0/zypp/ZYppCallbacks.h    2014-05-14 13:57:00.000000000 
+0200
+++ new/libzypp-14.24.0/zypp/ZYppCallbacks.h    2014-06-04 11:53:14.000000000 
+0200
@@ -777,21 +777,25 @@
     struct _MsgTypeDef {
       enum Enum { info, warning, error };
     };
-    typedef base::EnumClass<_MsgTypeDef> MsgType;      ///< 'enum class 
MsgType'
 
-    //     virtual bool start()
-    //     virtual bool progress()
-    //     virtual bool problem()
-    //     virtual bool finish()
+    typedef base::EnumClass<_MsgTypeDef> MsgType;      ///< 'enum class 
MsgType'
 
     /** Send a ready to show message text. */
     virtual bool message( MsgType type_r, const std::string & msg_r ) const { 
return true; }
-    /** \overload */
-    bool info( const std::string & msg_r ) const       { return message( 
MsgType::info, msg_r ); }
-    /** \overload */
-    bool warning( const std::string & msg_r ) const    { return message( 
MsgType::warning, msg_r ); }
-    /** \overload */
-    bool error( const std::string & msg_r ) const      { return message( 
MsgType::error, msg_r ); }
+
+
+    /** \name Static sender instance */
+    //@{
+    /** Singleton sender instance */
+    static callback::SendReport<JobReport> & instance();       // impl in 
ZYppImpl.cc
+
+    /** send message text */
+    static bool info( const MessageString & msg_r )    { return 
instance()->message( MsgType::info, msg_r ); }
+    /** send warning text */
+    static bool warning( const MessageString & msg_r ) { return 
instance()->message( MsgType::warning, msg_r ); }
+    /** send error text */
+    static bool error( const MessageString & msg_r )   { return 
instance()->message( MsgType::error, msg_r ); }
+    //@}
   };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/base/String.h 
new/libzypp-14.24.0/zypp/base/String.h
--- old/libzypp-14.21.0/zypp/base/String.h      2014-05-09 11:04:45.000000000 
+0200
+++ new/libzypp-14.24.0/zypp/base/String.h      2014-06-04 11:53:14.000000000 
+0200
@@ -40,6 +40,7 @@
     return fmter;
   }
 } // namespace boost
+namespace zypp { using boost::formatNAC; }
 ///////////////////////////////////////////////////////////////////
 
 ///////////////////////////////////////////////////////////////////
@@ -59,6 +60,16 @@
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
+  struct MessageString : public std::string
+  {
+    MessageString() {}
+    MessageString( const char * str_r )                : std::string( str_r ? 
str_r : "" ) {}
+    MessageString( const std::string & str_r )         : std::string( str_r ) 
{}
+    // boost::format, std::ostringstream, str::Str ...
+    template<class _Str>
+    MessageString( const _Str & str_r )        : std::string( str_r.str() ) {}
+  };
+
   /** Convenience \c char* constructible from \c std::string and \c char*,
    *  it maps \c (char*)0 to an empty string.
    *
@@ -223,6 +234,9 @@
       operator std::string() const
       { return _str.str(); }
 
+      std::string str() const
+      { return _str.str(); }
+
       std::ostream & stream()
       { return _str; }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/repo/RepoException.cc 
new/libzypp-14.24.0/zypp/repo/RepoException.cc
--- old/libzypp-14.21.0/zypp/repo/RepoException.cc      2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.24.0/zypp/repo/RepoException.cc      2014-05-28 
13:45:12.000000000 +0200
@@ -12,6 +12,7 @@
 #include <iostream>
 #include "zypp/repo/RepoException.h"
 #include "zypp/base/String.h"
+#include "zypp/base/Gettext.h"
 
 using std::endl;
 
@@ -106,19 +107,28 @@
     ///////////////////////////////////////////////////////////////////
 
 #define DEF_CTORS( CLASS, MSG ) \
-    CLASS::CLASS()                                                           : 
ServiceException( MSG ) {} \
-    CLASS::CLASS( const std::string & msg_r )                                : 
ServiceException( msg_r ) {} \
-    CLASS::CLASS( const ServiceInfo & service_r )                            : 
ServiceException( service_r, MSG ) {} \
-    CLASS::CLASS( const ServiceInfo & service_r, const std::string & msg_r ) : 
ServiceException( service_r, msg_r ) {}
+    CLASS::CLASS()                                                           : 
DEF_BASECLASS( MSG ) {} \
+    CLASS::CLASS( const std::string & msg_r )                                : 
DEF_BASECLASS( msg_r ) {} \
+    CLASS::CLASS( const ServiceInfo & service_r )                            : 
DEF_BASECLASS( service_r, MSG ) {} \
+    CLASS::CLASS( const ServiceInfo & service_r, const std::string & msg_r ) : 
DEF_BASECLASS( service_r, msg_r ) {}
 
+#define DEF_BASECLASS ServiceException
     DEF_CTORS( ServiceNoAliasException,       "Service has no alias defined." 
);
     DEF_CTORS( ServiceInvalidAliasException,  "Service has an invalid alias." 
);
     DEF_CTORS( ServiceAlreadyExistsException, "Service already exists." );
     DEF_CTORS( ServiceNoUrlException,         "Service has no or invalid url 
defined." );
-    DEF_CTORS( ServicePluginInformalException,"Service plugin has trouble 
providing the metadata but this should not be treated as error." );
 
-#undef DEF_CTORS
+    // sub classes:
+    DEF_CTORS( ServicePluginException,         "PLUGIN service exception." );
+
+    ///////////////////////////////////////////////////////////////////
+    // sub class: ServicePluginException
+#undef  DEF_BASECLASS
+#define DEF_BASECLASS ServicePluginException
+    DEF_CTORS( ServicePluginInformalException, "Service plugin has trouble 
providing the metadata but this should not be treated as error." );
+    DEF_CTORS( ServicePluginImmutableException,        _("Service plugin does 
not support changing an attribute.") );
 
+#undef DEF_CTORS
    /////////////////////////////////////////////////////////////////
   } // namespace repo
   ///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/repo/RepoException.h 
new/libzypp-14.24.0/zypp/repo/RepoException.h
--- old/libzypp-14.21.0/zypp/repo/RepoException.h       2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.24.0/zypp/repo/RepoException.h       2014-05-28 
13:45:12.000000000 +0200
@@ -239,10 +239,27 @@
         ServiceNoUrlException( const ServiceInfo & service_r );
         ServiceNoUrlException( const ServiceInfo & service_r, const 
std::string & msg_r );
     };
+    //@}
+
+
+    /** \name PLUGIN Service related exceptions.
+    */
+    //@{
+
+    /** PLUGIN Service related exceptions
+     */
+    class ServicePluginException : public ServiceException
+    {
+      public:
+        ServicePluginException();
+        ServicePluginException( const std::string & msg_r );
+        ServicePluginException( const ServiceInfo & service_r );
+        ServicePluginException( const ServiceInfo & service_r, const 
std::string & msg_r );
+    };
 
     /** Service plugin has trouble providing the metadata but this should not 
be treated as error.
      */
-    class ServicePluginInformalException : public ServiceException
+    class ServicePluginInformalException : public ServicePluginException
     {
       public:
         ServicePluginInformalException();
@@ -251,6 +268,16 @@
         ServicePluginInformalException( const ServiceInfo & service_r, const 
std::string & msg_r );
     };
 
+    /** Service plugin is immutable.
+     */
+    class ServicePluginImmutableException : public ServicePluginException
+    {
+      public:
+        ServicePluginImmutableException();
+        ServicePluginImmutableException( const std::string & msg_r );
+        ServicePluginImmutableException( const ServiceInfo & service_r );
+        ServicePluginImmutableException( const ServiceInfo & service_r, const 
std::string & msg_r );
+    };
     //@}
 
     /////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/repo/ServiceRepos.cc 
new/libzypp-14.24.0/zypp/repo/ServiceRepos.cc
--- old/libzypp-14.21.0/zypp/repo/ServiceRepos.cc       2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.24.0/zypp/repo/ServiceRepos.cc       2014-06-11 
07:41:17.000000000 +0200
@@ -88,7 +88,7 @@
        std::string errbuffer;
        prog.stderrGetUpTo( errbuffer, '\0' );
        ERR << "Capture plugin error:[" << endl << errbuffer << endl << ']' << 
endl;
-       ZYPP_THROW( repo::ServicePluginInformalException(errbuffer));
+       ZYPP_THROW( repo::ServicePluginInformalException( service, errbuffer ) 
);
       }
 
       parser::RepoFileReader parser(buffer, _callback);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/target/RpmPostTransCollector.cc 
new/libzypp-14.24.0/zypp/target/RpmPostTransCollector.cc
--- old/libzypp-14.21.0/zypp/target/RpmPostTransCollector.cc    2014-04-10 
19:20:45.000000000 +0200
+++ new/libzypp-14.24.0/zypp/target/RpmPostTransCollector.cc    2014-06-03 
17:40:40.000000000 +0200
@@ -80,7 +80,6 @@
            return;
 
          HistoryLog historylog;
-         callback::SendReport<JobReport> report;
 
          Pathname noRootScriptDir( filesystem::TmpDir::defaultLocation() / 
tmpDir().basename() );
 
@@ -107,7 +106,7 @@
                str::Str msg;
                msg << "Output of " << pkgident << " %posttrans script:\n" << 
scriptmsg;
                historylog.comment( msg, true /*timestamp*/);
-               report->info( msg );
+               JobReport::info( msg );
              }
 
              if ( ret != 0 )
@@ -116,7 +115,7 @@
                msg << pkgident << " %posttrans script failed (returned " << 
ret << ")";
                WAR << msg << endl;
                historylog.comment( msg, true /*timestamp*/);
-               report->warning( msg );
+               JobReport::warning( msg );
              }
            }
          }
@@ -130,7 +129,6 @@
            return;
 
          HistoryLog historylog;
-         callback::SendReport<JobReport> report;
 
          str::Str msg;
          msg << "%posttrans scripts skipped while aborting:\n";
@@ -142,7 +140,7 @@
          }
 
          historylog.comment( msg, true /*timestamp*/);
-         report->warning( msg );
+         JobReport::warning( msg );
 
          _scripts.clear();
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.21.0/zypp/zypp_detail/ZYppImpl.cc 
new/libzypp-14.24.0/zypp/zypp_detail/ZYppImpl.cc
--- old/libzypp-14.21.0/zypp/zypp_detail/ZYppImpl.cc    2013-04-05 
14:29:29.000000000 +0200
+++ new/libzypp-14.24.0/zypp/zypp_detail/ZYppImpl.cc    2014-06-03 
17:40:40.000000000 +0200
@@ -24,11 +24,20 @@
 #include "zypp/sat/Pool.h"
 #include "zypp/PoolItem.h"
 
+#include "zypp/ZYppCallbacks.h"        // JobReport::instance
+
 using std::endl;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
+
+  callback::SendReport<JobReport> & JobReport::instance()
+  {
+    static callback::SendReport<JobReport> _report;
+    return _report;
+  }
+
   ///////////////////////////////////////////////////////////////////
   namespace zypp_detail
   { /////////////////////////////////////////////////////////////////

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to