Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory checked 
in at 2012-09-13 00:04:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
 and      /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libzypp", Maintainer is "m...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes  2012-09-01 
10:32:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes     2012-09-13 
00:04:50.000000000 +0200
@@ -1,0 +2,17 @@
+Wed Sep 12 10:28:00 CEST 2012 - m...@suse.de
+
+- Add str::commonPrefix
+- version 12.2.0 (0)
+
+-------------------------------------------------------------------
+Sun Sep  9 01:13:25 CEST 2012 - m...@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Wed Sep  5 11:56:54 CEST 2012 - g...@suse.de
+
+- Provide Target::reload() 
+- version 12.1.0 (0)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-12.0.1.tar.bz2

New:
----
  libzypp-12.2.0.tar.bz2

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

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.2F2pN0/_old  2012-09-13 00:04:51.000000000 +0200
+++ /var/tmp/diff_new_pack.2F2pN0/_new  2012-09-13 00:04:51.000000000 +0200
@@ -24,7 +24,7 @@
 Group:          System/Packages
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Summary:        Package, Patch, Pattern, and Product Management
-Version:        12.0.1
+Version:        12.2.0
 Release:        1
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc

++++++ libzypp-12.0.1.tar.bz2 -> libzypp-12.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/VERSION.cmake 
new/libzypp-12.2.0/VERSION.cmake
--- old/libzypp-12.0.1/VERSION.cmake    2012-08-26 01:36:49.000000000 +0200
+++ new/libzypp-12.2.0/VERSION.cmake    2012-09-12 11:15:22.000000000 +0200
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "12")
 SET(LIBZYPP_COMPATMINOR "0")
-SET(LIBZYPP_MINOR "0")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_MINOR "2")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 12.0.1 (0)
+# LAST RELEASED: 12.2.0 (0)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/package/libzypp.changes 
new/libzypp-12.2.0/package/libzypp.changes
--- old/libzypp-12.0.1/package/libzypp.changes  2012-08-26 01:36:49.000000000 
+0200
+++ new/libzypp-12.2.0/package/libzypp.changes  2012-09-12 11:15:22.000000000 
+0200
@@ -1,4 +1,21 @@
 -------------------------------------------------------------------
+Wed Sep 12 10:28:00 CEST 2012 - m...@suse.de
+
+- Add str::commonPrefix
+- version 12.2.0 (0)
+
+-------------------------------------------------------------------
+Sun Sep  9 01:13:25 CEST 2012 - m...@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Wed Sep  5 11:56:54 CEST 2012 - g...@suse.de
+
+- Provide Target::reload() 
+- version 12.1.0 (0)
+
+-------------------------------------------------------------------
 Sun Aug 26 01:13:31 CEST 2012 - m...@suse.de
 
 - Update zypp-po.tar.bz2
Files old/libzypp-12.0.1/po/zypp-po.tar.bz2 and 
new/libzypp-12.2.0/po/zypp-po.tar.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/tests/zypp/base/String_test.cc 
new/libzypp-12.2.0/tests/zypp/base/String_test.cc
--- old/libzypp-12.0.1/tests/zypp/base/String_test.cc   2012-08-26 
01:36:49.000000000 +0200
+++ new/libzypp-12.2.0/tests/zypp/base/String_test.cc   2012-09-12 
11:15:22.000000000 +0200
@@ -248,6 +248,13 @@
   BOOST_CHECK( str::contains("abcXabcYabc", "XabcY") );
   BOOST_CHECK( ! str::contains("abcXabcYabc", "xabcy") );
   BOOST_CHECK( str::containsCI("abcXabcYabc", "xabcy") );
+
+  BOOST_CHECK_EQUAL( str::commonPrefix("", ""),                0 );
+  BOOST_CHECK_EQUAL( str::commonPrefix("a", ""),       0 );
+  BOOST_CHECK_EQUAL( str::commonPrefix("", "b"),       0 );
+  BOOST_CHECK_EQUAL( str::commonPrefix("a", "b"),      0 );
+  BOOST_CHECK_EQUAL( str::commonPrefix("c", "c"),      1 );
+  BOOST_CHECK_EQUAL( str::commonPrefix("ca", "cb"),    1 );
 }
 
 BOOST_AUTO_TEST_CASE(hexencode_hexdecode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/zypp/Target.cc 
new/libzypp-12.2.0/zypp/Target.cc
--- old/libzypp-12.0.1/zypp/Target.cc   2012-08-26 01:36:49.000000000 +0200
+++ new/libzypp-12.2.0/zypp/Target.cc   2012-09-12 11:15:22.000000000 +0200
@@ -79,6 +79,9 @@
   void Target::load()
   { _pimpl->load(); }
 
+  void Target::reload()
+  { _pimpl->reload(); }
+  
   void Target::unload()
   { _pimpl->unload(); }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/zypp/Target.h 
new/libzypp-12.2.0/zypp/Target.h
--- old/libzypp-12.0.1/zypp/Target.h    2012-08-26 01:36:49.000000000 +0200
+++ new/libzypp-12.2.0/zypp/Target.h    2012-09-12 11:15:22.000000000 +0200
@@ -70,6 +70,8 @@
      */
     void load();
 
+    void reload();
+    
     /**
      * unload target resolvables from the
      * pool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/zypp/base/String.h 
new/libzypp-12.2.0/zypp/base/String.h
--- old/libzypp-12.0.1/zypp/base/String.h       2012-08-26 01:36:49.000000000 
+0200
+++ new/libzypp-12.2.0/zypp/base/String.h       2012-09-12 11:15:22.000000000 
+0200
@@ -827,6 +827,16 @@
         return std::string( str_r, str_r.size() - suffix_r.size() );
       return str_r.c_str();
     }
+    /** Return size of the common prefix of \a lhs and \a rhs. */
+    inline std::string::size_type commonPrefix( const C_Str & lhs, const C_Str 
& rhs )
+    {
+      const char * lp = lhs.c_str();
+      const char * rp = rhs.c_str();
+      std::string::size_type ret = 0;
+      while ( *lp == *rp && *lp != '\0' )
+      { ++lp, ++rp, ++ret; }
+      return ret;
+    }
 
     /** alias for \ref hasPrefix */
     inline bool startsWith( const C_Str & str_r, const C_Str & prefix_r )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/zypp/target/TargetImpl.cc 
new/libzypp-12.2.0/zypp/target/TargetImpl.cc
--- old/libzypp-12.0.1/zypp/target/TargetImpl.cc        2012-08-26 
01:36:49.000000000 +0200
+++ new/libzypp-12.2.0/zypp/target/TargetImpl.cc        2012-09-12 
11:15:22.000000000 +0200
@@ -818,7 +818,7 @@
       filesystem::recursive_rmdir( base );
     }
 
-    void TargetImpl::buildCache()
+    bool TargetImpl::buildCache()
     {
       Pathname base = solvfilesPath();
       Pathname rpmsolv       = base/"solv";
@@ -958,6 +958,12 @@
            }
        }
       }
+      return build_rpm_solv;
+    }
+
+    void TargetImpl::reload()
+    {
+        load( false );
     }
 
     void TargetImpl::unload()
@@ -967,11 +973,12 @@
         system.eraseFromPool();
     }
 
-
-    void TargetImpl::load()
+    void TargetImpl::load( bool force )
     {
-      buildCache();
-
+      bool newCache = buildCache();
+      MIL << "New cache built: " << (newCache?"true":"false") <<
+        ", force loading: " << (force?"true":"false") << endl;
+ 
       // now add the repos to the pool
       sat::Pool satpool( sat::Pool::instance() );
       Pathname rpmsolv( solvfilesPath() / "solv" );
@@ -979,10 +986,19 @@
 
       // Providing an empty system repo, unload any old content
       Repository system( sat::Pool::instance().findSystemRepo() );
+
       if ( system && ! system.solvablesEmpty() )
       {
-        system.eraseFromPool(); // invalidates system
+        if ( newCache || force )
+        {
+          system.eraseFromPool(); // invalidates system
+        }
+        else
+        {
+          return;     // nothing to do
+        }
       }
+      
       if ( ! system )
       {
         system = satpool.systemRepo();
@@ -990,6 +1006,7 @@
 
       try
       {
+        MIL << "adding " << rpmsolv << " to system" << endl;
         system.addSolv( rpmsolv );
       }
       catch ( const Exception & exp )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-12.0.1/zypp/target/TargetImpl.h 
new/libzypp-12.2.0/zypp/target/TargetImpl.h
--- old/libzypp-12.0.1/zypp/target/TargetImpl.h 2012-08-26 01:36:49.000000000 
+0200
+++ new/libzypp-12.2.0/zypp/target/TargetImpl.h 2012-09-12 11:15:22.000000000 
+0200
@@ -101,13 +101,15 @@
       Pathname _tmpSolvfilesPath;
 
     public:
-      void load();
+      void load( bool force = true );
 
       void unload();
 
+      void reload();
+      
       void clearCache();
 
-      void buildCache();
+      bool buildCache();
       //@}
 
     public:

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to