Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory checked 
in at 2014-07-29 16:48:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-07-21 
10:34:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes     2014-07-29 
16:48:12.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Jul 28 11:32:40 CEST 2014 - [email protected]
+
+- reverted last commit to make yast2-pkg-bindings build again
+
+-------------------------------------------------------------------
+Fri Jul 25 12:56:17 CEST 2014 - [email protected]
+
+- JobReport: extend callback to allow passing UserData
+- hardlinkCopy must not fail if proc/sys/fs/protected_hardlink is on
+- adapt to changed boost::error_category throw specifier
+- version 14.27.0 (27)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-14.26.1.tar.bz2

New:
----
  libzypp-14.27.0.tar.bz2

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

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.GuSNuD/_old  2014-07-29 16:48:13.000000000 +0200
+++ /var/tmp/diff_new_pack.GuSNuD/_new  2014-07-29 16:48:13.000000000 +0200
@@ -23,7 +23,7 @@
 Summary:        Package, Patch, Pattern, and Product Management
 License:        GPL-2.0+
 Group:          System/Packages
-Version:        14.26.1
+Version:        14.27.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc

++++++ libzypp-14.26.1.tar.bz2 -> libzypp-14.27.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/VERSION.cmake 
new/libzypp-14.27.0/VERSION.cmake
--- old/libzypp-14.26.1/VERSION.cmake   2014-07-18 08:58:44.000000000 +0200
+++ new/libzypp-14.27.0/VERSION.cmake   2014-07-25 12:58:04.000000000 +0200
@@ -59,10 +59,10 @@
 #   See './mkChangelog -h' for help.
 #
 SET(LIBZYPP_MAJOR "14")
-SET(LIBZYPP_COMPATMINOR "26")
-SET(LIBZYPP_MINOR "26")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_COMPATMINOR "27")
+SET(LIBZYPP_MINOR "27")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 14.26.1 (26)
+# LAST RELEASED: 14.27.0 (27)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/package/libzypp.changes 
new/libzypp-14.27.0/package/libzypp.changes
--- old/libzypp-14.26.1/package/libzypp.changes 2014-07-18 08:58:44.000000000 
+0200
+++ new/libzypp-14.27.0/package/libzypp.changes 2014-07-28 11:43:25.000000000 
+0200
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Mon Jul 28 11:32:40 CEST 2014 - [email protected]
+
+- reverted last commit to make yast2-pkg-bindings build again
+
+-------------------------------------------------------------------
+Fri Jul 25 12:56:17 CEST 2014 - [email protected]
+
+- JobReport: extend callback to allow passing UserData
+- hardlinkCopy must not fail if proc/sys/fs/protected_hardlink is on
+- adapt to changed boost::error_category throw specifier
+- version 14.27.0 (27)
+
+-------------------------------------------------------------------
 Fri Jul 18 08:57:39 CEST 2014 - [email protected]
 
 - Execute install scripts with cwd==/ (bnc#886764)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/tests/zypp/CMakeLists.txt 
new/libzypp-14.27.0/tests/zypp/CMakeLists.txt
--- old/libzypp-14.26.1/tests/zypp/CMakeLists.txt       2014-07-01 
11:30:28.000000000 +0200
+++ new/libzypp-14.27.0/tests/zypp/CMakeLists.txt       2014-07-25 
12:58:04.000000000 +0200
@@ -9,6 +9,7 @@
   Arch
   Capabilities
   CheckSum
+  ContentType
   CpeId
   Date
   Dup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/tests/zypp/ContentType_test.cc 
new/libzypp-14.27.0/tests/zypp/ContentType_test.cc
--- old/libzypp-14.26.1/tests/zypp/ContentType_test.cc  1970-01-01 
01:00:00.000000000 +0100
+++ new/libzypp-14.27.0/tests/zypp/ContentType_test.cc  2014-07-25 
12:58:04.000000000 +0200
@@ -0,0 +1,65 @@
+#include <boost/test/auto_unit_test.hpp>
+#include <set>
+#include "zypp/ContentType.h"
+
+using std::cout;
+using std::endl;
+
+using zypp::ContentType;
+
+BOOST_AUTO_TEST_CASE(contenttype_default)
+{
+  ContentType v;
+  BOOST_CHECK( !v );
+  BOOST_CHECK( v.empty() );
+  BOOST_CHECK( v.emptyType() );
+  BOOST_CHECK( v.emptySubtype() );
+
+  ContentType w( "/" );
+  BOOST_CHECK_EQUAL( v == w, true );
+  BOOST_CHECK_EQUAL( v != w, false );
+  BOOST_CHECK_EQUAL( v <  w, false );
+  BOOST_CHECK_EQUAL( v <= w, true );
+  BOOST_CHECK_EQUAL( v >  w, false );
+  BOOST_CHECK_EQUAL( v >= w, true );
+
+  BOOST_CHECK_EQUAL( v.asString(), "" );
+}
+
+BOOST_AUTO_TEST_CASE(contenttype_val)
+{
+  BOOST_CHECK_THROW( ContentType( " " ), std::invalid_argument );
+
+  BOOST_CHECK_THROW( ContentType( "//" ), std::invalid_argument );
+  BOOST_CHECK_THROW( ContentType( "/ " ), std::invalid_argument );
+
+  BOOST_CHECK_THROW( ContentType( "/", "a" ), std::invalid_argument );
+  BOOST_CHECK_THROW( ContentType( "a", "/" ), std::invalid_argument );
+
+  BOOST_CHECK_THROW( ContentType( " ", "a" ), std::invalid_argument );
+  BOOST_CHECK_THROW( ContentType( "a", " " ), std::invalid_argument );
+}
+
+BOOST_AUTO_TEST_CASE(contenttype_cmp)
+{
+  std::set<ContentType> c( {
+    ContentType( "" ),
+    ContentType( "/" ),                // == ""
+    ContentType( "a" ),
+    ContentType( "a/" ),       // == "a"
+    ContentType( "/a" ),
+    ContentType( "" , "a" ),   // == "/a"
+    ContentType( "a/b" ),
+    ContentType( "b/b" ),
+    ContentType( "b/c" )
+  });
+
+  std::set<ContentType>::const_iterator i = c.begin();
+  BOOST_CHECK_EQUAL( *(i++), ContentType() );
+  BOOST_CHECK_EQUAL( *(i++), ContentType( "", "a" ) );
+  BOOST_CHECK_EQUAL( *(i++), ContentType( "a", "" ) );
+  BOOST_CHECK_EQUAL( *(i++), ContentType( "a", "b" ) );
+  BOOST_CHECK_EQUAL( *(i++), ContentType( "b", "b" ) );
+  BOOST_CHECK_EQUAL( *(i++), ContentType( "b", "c" ) );
+  BOOST_CHECK( i == c.end() );
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/CMakeLists.txt 
new/libzypp-14.27.0/zypp/CMakeLists.txt
--- old/libzypp-14.26.1/zypp/CMakeLists.txt     2014-07-11 13:45:16.000000000 
+0200
+++ new/libzypp-14.27.0/zypp/CMakeLists.txt     2014-07-25 12:58:04.000000000 
+0200
@@ -103,6 +103,7 @@
   CapMatch.h
   Changelog.h
   CheckSum.h
+  ContentType.h
   CountryCode.h
   CpeId.h
   Date.h
@@ -179,6 +180,7 @@
   TmpPath.h
   TriBool.h
   Url.h
+  UserData.h
   VendorAttr.h
   VendorSupportOptions.h
   ZConfig.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/Callback.h 
new/libzypp-14.27.0/zypp/Callback.h
--- old/libzypp-14.26.1/zypp/Callback.h 2014-07-01 11:30:28.000000000 +0200
+++ new/libzypp-14.27.0/zypp/Callback.h 2014-07-25 12:58:04.000000000 +0200
@@ -125,7 +125,11 @@
    * \li \c whoIsConnected Return a 'ReceiveReport*' to the currently
    * connected ReceiveReport, or \c NULL if none is connected.
    *
-  */
+   * \par Passing Userdata via Callbacks
+   *
+   * For typesafe passing of user data via callbacks \see \ref UserData.
+   *
+   */
   namespace callback
   { /////////////////////////////////////////////////////////////////
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/ContentType.h 
new/libzypp-14.27.0/zypp/ContentType.h
--- old/libzypp-14.26.1/zypp/ContentType.h      1970-01-01 01:00:00.000000000 
+0100
+++ new/libzypp-14.27.0/zypp/ContentType.h      2014-07-25 12:58:04.000000000 
+0200
@@ -0,0 +1,144 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/ContentType.h
+ */
+#ifndef ZYPP_CONTENTTYPE_H
+#define ZYPP_CONTENTTYPE_H
+
+#include <iosfwd>
+#include <string>
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{
+  ///////////////////////////////////////////////////////////////////
+  /// \class ContentType
+  /// \brief Mime type like \c 'type/subtype' classification of content
+  ///
+  /// Used e.g. in \ref callback::UserData to describe the kind of
+  /// user data passed as \c void* to a callback. Neither type nor
+  /// subtype may contain a '/'.
+  ///////////////////////////////////////////////////////////////////
+  class ContentType
+  {
+  public:
+    /** Default ctor: empty */
+    ContentType()
+    {}
+
+    /** Ctor taking <tt>"type[/subtype]"</tt>
+     * \throws std::invalid_argument if string is malformed
+     */
+    explicit ContentType( const std::string & type_r )
+    {
+      std::string::size_type pos = type_r.find( "/" );
+      if ( pos == std::string::npos )
+      {
+       testAndSet( _type, type_r );
+      }
+      else
+      {
+       testAndSet( _type,    type_r.substr( 0, pos ) );
+       testAndSet( _subtype, type_r.substr( pos+1 ) );
+      }
+    }
+
+    /** Ctor taking type and subtype
+     * \throws std::invalid_argument if string is malformed
+     */
+    ContentType( const std::string & type_r, const std::string & subtype_r )
+    {
+      testAndSet( _type,    type_r );
+      testAndSet( _subtype, subtype_r );
+    }
+
+  public:
+    /** Get type */
+    const std::string & type() const
+    { return _type; }
+
+    /** Set type
+     * \throws std::invalid_argument if string is malformed
+     */
+    void type( const std::string & type_r )
+    { _type = type_r; }
+
+    /**  Get subtype */
+    const std::string & subtype() const
+    { return _subtype; }
+
+    /**  Set subtype
+     * \throws std::invalid_argument if string is malformed
+     */
+    void subtype( const std::string & subtype_r )
+    { _subtype = subtype_r; }
+
+  public:
+    /** Whether type and subtype are empty */
+    bool empty() const
+    { return emptyType() && emptySubtype(); }
+    /** Whether type is empty */
+    bool emptyType() const
+    { return _type.empty(); }
+    /** Whether subtype is empty */
+    bool emptySubtype() const
+    { return _subtype.empty(); }
+
+    /** Validate object in a boolean context: !empty */
+    explicit operator bool () const
+    { return !empty(); }
+
+    /** String representation <tt>"type[/subtype]"</tt> */
+    std::string asString() const
+    { std::string ret( type() ); if ( ! emptySubtype() ) { ret += "/"; ret += 
subtype(); } return ret; }
+
+  private:
+    void testAndSet( std::string & var_r, const std::string & val_r )
+    {
+      if ( val_r.find_first_of( "/ \t\r\n" ) != std::string::npos )
+       throw std::invalid_argument( "ContentType: illegal char in '" + val_r + 
"'" );
+      var_r = val_r;
+    }
+  private:
+    std::string        _type;
+    std::string        _subtype;
+  };
+
+  /** \relates ContentType Stream output */
+  inline std::ostream & operator<<( std::ostream & str, const ContentType & 
obj )
+  { return str << obj.asString(); }
+
+  /** \relates ContentType */
+  inline bool operator==( const ContentType & lhs, const ContentType & rhs )
+  { return lhs.type() == rhs.type() && lhs.subtype() == rhs.subtype(); }
+
+  /** \relates ContentType */
+  inline bool operator!=( const ContentType & lhs, const ContentType & rhs )
+  { return !( lhs == rhs ); }
+
+  /** \relates ContentType */
+  inline bool operator<( const ContentType & lhs, const ContentType & rhs )
+  { int cmp = lhs.type().compare( rhs.type() ); return cmp < 0 || ( cmp == 0 
&& lhs.subtype() < rhs.subtype() ); }
+
+  /** \relates ContentType */
+  inline bool operator<=( const ContentType & lhs, const ContentType & rhs )
+  { return lhs < rhs || lhs == rhs; }
+
+  /** \relates ContentType */
+  inline bool operator>( const ContentType & lhs, const ContentType & rhs )
+  { return !( lhs <= rhs ); }
+
+  /** \relates ContentType */
+  inline bool operator>=( const ContentType & lhs, const ContentType & rhs )
+  { return !( lhs < rhs ); }
+
+
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_CONTENTTYPE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/PathInfo.cc 
new/libzypp-14.27.0/zypp/PathInfo.cc
--- old/libzypp-14.26.1/zypp/PathInfo.cc        2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.27.0/zypp/PathInfo.cc        2014-07-25 12:58:04.000000000 
+0200
@@ -836,6 +836,7 @@
       {
         switch ( errno )
         {
+         case EPERM: // /proc/sys/fs/protected_hardlink in proc(5)
           case EXDEV: // oldpath  and  newpath are not on the same mounted 
file system
             return copy( oldpath, newpath );
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/UserData.h 
new/libzypp-14.27.0/zypp/UserData.h
--- old/libzypp-14.26.1/zypp/UserData.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-14.27.0/zypp/UserData.h 2014-07-25 12:58:04.000000000 +0200
@@ -0,0 +1,70 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/UserData.h
+ */
+#ifndef ZYPP_USERDATA_H
+#define ZYPP_USERDATA_H
+
+#include <iosfwd>
+#include <string>
+#include <map>
+#include <boost/any.hpp>
+
+#include "zypp/base/PtrTypes.h"
+#include "zypp/ContentType.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{
+  ///////////////////////////////////////////////////////////////////
+  namespace callback
+  {
+    ///////////////////////////////////////////////////////////////////
+    /// \class UserData
+    /// \brief Typesafe passing of user data via callbacks
+    ///
+    /// Basically a <tt>std::map<std::string,boost::any></tt> plus
+    /// associated \ref ContentType.
+    ///////////////////////////////////////////////////////////////////
+    class UserData
+    {
+      typedef std::map<std::string,boost::any> DataType;
+    public:
+      /** Default ctor */
+      UserData()
+      {}
+
+    public:
+      /** Get type */
+      const ContentType & type() const
+      { return _type; }
+
+      /** Set type */
+      void type( const ContentType & type_r )
+      { _type = type_r; }
+
+    public:
+      /**  Validate object in a boolean context: has data */
+      explicit operator bool() const
+      { return ! ( _dataP == nullptr || _dataP->empty() ); }
+
+    private:
+      ContentType              _type;
+      shared_ptr<DataType>     _dataP;
+    };
+
+    /** \relates UserData Stream output */
+    inline std::ostream & operator<<( std::ostream & str, const UserData & obj 
)
+    { return str << "UserData(" << obj.type() << ")";}
+
+  } // namespace callback
+  ///////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_USERDATA_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.26.1/zypp/ZYppCallbacks.h 
new/libzypp-14.27.0/zypp/ZYppCallbacks.h
--- old/libzypp-14.26.1/zypp/ZYppCallbacks.h    2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.27.0/zypp/ZYppCallbacks.h    2014-07-25 12:58:04.000000000 
+0200
@@ -14,6 +14,7 @@
 
 #include "zypp/base/EnumClass.h"
 #include "zypp/Callback.h"
+#include "zypp/UserData.h"
 #include "zypp/Resolvable.h"
 #include "zypp/RepoInfo.h"
 #include "zypp/Pathname.h"
@@ -765,23 +766,26 @@
       ) {}
   };
 
-
-
   ///////////////////////////////////////////////////////////////////
   /// \class JobReport
   /// \brief Generic report for sending messages.
   ///////////////////////////////////////////////////////////////////
   struct JobReport : public callback::ReportBase
   {
+  public:
     /** message type (use like 'enum class \ref MsgType') */
     struct _MsgTypeDef {
-      enum Enum { info, warning, error };
+      enum Enum { debug, info, warning, error, important, data };
     };
-
     typedef base::EnumClass<_MsgTypeDef> MsgType;      ///< 'enum class 
MsgType'
 
+    /** typsafe map of userdata */
+    typedef callback::UserData UserData;
+
+  public:
     /** Send a ready to show message text. */
-    virtual bool message( MsgType type_r, const std::string & msg_r ) const { 
return true; }
+    virtual bool message( MsgType type_r, const std::string & msg_r, const 
UserData & userData_r ) const
+    { return true; }
 
 
     /** \name Static sender instance */
@@ -789,12 +793,29 @@
     /** Singleton sender instance */
     static callback::SendReport<JobReport> & instance();       // impl in 
ZYppImpl.cc
 
+    /** send debug message text */
+    static bool debug( const MessageString & msg_r, const UserData & 
userData_r = UserData() )
+    { return instance()->message( MsgType::debug, msg_r, userData_r ); }
+
     /** send message text */
-    static bool info( const MessageString & msg_r )    { return 
instance()->message( MsgType::info, msg_r ); }
+    static bool info( const MessageString & msg_r, const UserData & userData_r 
= UserData() )
+    { return instance()->message( MsgType::info, msg_r, userData_r ); }
+
     /** send warning text */
-    static bool warning( const MessageString & msg_r ) { return 
instance()->message( MsgType::warning, msg_r ); }
+    static bool warning( const MessageString & msg_r, const UserData & 
userData_r = UserData() )
+    { return instance()->message( MsgType::warning, msg_r, userData_r ); }
+
     /** send error text */
-    static bool error( const MessageString & msg_r )   { return 
instance()->message( MsgType::error, msg_r ); }
+    static bool error( const MessageString & msg_r, const UserData & 
userData_r = UserData() )
+    { return instance()->message( MsgType::error, msg_r, userData_r ); }
+
+    /** send important message text */
+    static bool important( const MessageString & msg_r, const UserData & 
userData_r = UserData() )
+    { return instance()->message( MsgType::important, msg_r, userData_r ); }
+
+    /** send data message */
+    static bool data( const MessageString & msg_r, const UserData & userData_r 
= UserData() )
+    { return instance()->message( MsgType::data, msg_r, userData_r ); }
     //@}
   };
 

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

Reply via email to