version 5.24.0
authorMichael Andres <ma@suse.de>
Fri, 21 Nov 2008 12:05:11 +0000 (12:05 +0000)
committerMichael Andres <ma@suse.de>
Fri, 21 Nov 2008 12:05:11 +0000 (12:05 +0000)
VERSION.cmake
devel/devel.ma/Iorder.cc
package/libzypp.changes

index 6903b18..651bf0e 100644 (file)
@@ -63,6 +63,6 @@ SET(LIBZYPP_COMPATMINOR "23")
 SET(LIBZYPP_MINOR "24")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 5.23.0 (23)
+# LAST RELEASED: 5.24.0 (23)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 960ef82..560adcc 100644 (file)
@@ -3,11 +3,14 @@
 
 #include "zypp/pool/GetResolvablesToInsDel.h"
 
+Pathname mroot( "/tmp/Bb" );
+TestSetup test( mroot, Arch_ppc64 );
+
 bool upgrade()
 {
   bool rres = false;
   {
-    //zypp::base::LogControl::TmpLineWriter shutUp;
+    zypp::base::LogControl::TmpLineWriter shutUp;
     UpgradeStatistics u;
     rres = getZYpp()->resolver()->doUpgrade( u );
   }
@@ -23,6 +26,8 @@ bool upgrade()
 
 bool solve()
 {
+  static unsigned run = 0;
+  USR << "Solve " << run++ << endl;
   bool rres = false;
   {
     //zypp::base::LogControl::TmpLineWriter shutUp;
@@ -34,10 +39,35 @@ bool solve()
     getZYpp()->resolver()->problems();
     return false;
   }
-  MIL << "resolve " << rres << endl;
   return true;
 }
 
+bool verify()
+{
+  bool rres = solve();
+  ResPool pool( test.pool() );
+  for_( it, make_filter_begin<resfilter::ByTransact>(pool),
+        make_filter_end<resfilter::ByTransact>(pool) )
+  {
+    if ( it->status().transacts() &&
+         it->status().isBySolver() )
+    {
+      WAR << "MISSING " << *it << endl;
+    }
+  }
+  return rres;
+}
+
+inline void save()
+{
+  test.poolProxy().saveState();
+}
+
+inline void restore()
+{
+  test.poolProxy().restoreState();
+}
+
 /******************************************************************
 **
 **      FUNCTION NAME : main
@@ -49,9 +79,75 @@ int main( int argc, char * argv[] )
 
   Pathname mroot( "/tmp/Bb" );
   TestSetup test( mroot, Arch_ppc64 );
-  test.loadTarget();
-  test.loadTestcaseRepos( "/suse/ma/BUGS/439802/bug439802/YaST2/solverTestcase" );
+  {
+    zypp::base::LogControl::TmpLineWriter shutUp;
+    test.loadTarget();
+    test.loadTestcaseRepos( "/suse/ma/BUGS/439802/bug439802/YaST2/solverTestcase" );
+  }
+
+  save();
+  {
+    zypp::base::LogControl::TmpLineWriter shutUp;
+    getPi<Product>( "SUSE_SLES", Edition("11"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER );
+    getPi<Package>( "sles-release", Edition("11-54.3"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER );
+    //upgrade();
+  }
+  ResPool pool( test.pool() );
+  vdumpPoolStats( USR << "Transacting:"<< endl,
+                  make_filter_begin<resfilter::ByTransact>(pool),
+                  make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+
+  getZYpp()->resolver()->setIgnoreAlreadyRecommended( true );
+  getZYpp()->resolver()->setOnlyRequires( true );
 
+  restore();
+  getPi<Package>( "gvfs-backends", Edition("1.0.2-1.4"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER );
+
+  INT << sat::Solvable(909).requires() << endl;
+
+  vdumpPoolStats( SEC << "Transacting:"<< endl,
+                  make_filter_begin<resfilter::ByTransact>(pool),
+                  make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+  verify();
+  vdumpPoolStats( SEC << "Transacting:"<< endl,
+                  make_filter_begin<resfilter::ByTransact>(pool),
+                  make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+  INT << "===[END]============================================" << endl << endl;
+  zypp::base::LogControl::TmpLineWriter shutUp1;
+  return 0;
+
+  pool::GetResolvablesToInsDel collect( pool, pool::GetResolvablesToInsDel::ORDER_BY_MEDIANR );
+
+  {
+    for_( it, collect._toDelete.begin(), collect._toDelete.end() )
+    {
+      restore();
+      it->status().setTransact( true, ResStatus::USER );
+      SEC << *it << endl;
+      vdumpPoolStats( SEC << "Transacting:"<< endl,
+                      make_filter_begin<resfilter::ByTransact>(pool),
+                      make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+      save();
+      verify();
+    }
+  }
+
+  {
+    for_( it, collect._toInstall.begin(), collect._toInstall.end() )
+    {
+      restore();
+      it->status().setTransact( true, ResStatus::USER );
+      SEC << *it << endl;
+      vdumpPoolStats( SEC << "Transacting:"<< endl,
+                      make_filter_begin<resfilter::ByTransact>(pool),
+                      make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+      save();
+      verify();
+    }
+  }
+
+
+#if 0
   //getPi<>( "", "", Edition(""), Arch("") );
   getPi<Product>( "SUSE_SLES", Edition("11"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER );
   getPi<Package>( "sles-release", Edition("11-54.3"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER );
@@ -67,6 +163,7 @@ int main( int argc, char * argv[] )
 
   pool::GetResolvablesToInsDel collect( pool, pool::GetResolvablesToInsDel::ORDER_BY_MEDIANR );
   MIL << "GetResolvablesToInsDel:" << endl << collect << endl;
+
   if ( 1 )
   {
     // Collect until the 1st package from an unwanted media occurs.
@@ -85,9 +182,6 @@ int main( int argc, char * argv[] )
           fst=it;
         hitUnwantedMedia = true;
       }
-      else
-      {
-      }
     }
     dumpRange( WAR << "toInstall1: " << endl,
                collect._toInstall.begin(), fst ) << endl;
@@ -103,8 +197,16 @@ int main( int argc, char * argv[] )
     dumpRange( ERR << "toDelete: " << endl,
                collect._toDelete.begin(), collect._toDelete.end() ) << endl;
   }
+  INT << "===[END]============================================" << endl << endl;
+  return 0;
+#endif
+
+
+
+
 
   INT << "===[END]============================================" << endl << endl;
+  zypp::base::LogControl::TmpLineWriter shutUp;
   return 0;
 }
 
index 2145d85..4c09ea3 100644 (file)
@@ -3,6 +3,7 @@ Thu Nov 20 23:59:16 CET 2008 - ma@suse.de
 
 - Fix retrieval of deltarpm info.
 - revision 11764
+- version 5.24.0 (23)
 
 -------------------------------------------------------------------
 Thu Nov 20 22:15:28 CET 2008 - ma@suse.de