From 585ba66e3b9e1ec55d5c7032d06d4fa554442561 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 21 Nov 2008 12:05:11 +0000 Subject: [PATCH] version 5.24.0 --- VERSION.cmake | 2 +- devel/devel.ma/Iorder.cc | 116 ++++++++++++++++++++++++++++++++++++++++++++--- package/libzypp.changes | 1 + 3 files changed, 111 insertions(+), 8 deletions(-) diff --git a/VERSION.cmake b/VERSION.cmake index 6903b18..651bf0e 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -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) #======= diff --git a/devel/devel.ma/Iorder.cc b/devel/devel.ma/Iorder.cc index 960ef82..560adcc 100644 --- a/devel/devel.ma/Iorder.cc +++ b/devel/devel.ma/Iorder.cc @@ -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(pool), + make_filter_end(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( "SUSE_SLES", Edition("11"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER ); + getPi( "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(pool), + make_filter_end(pool) ) << endl; + + getZYpp()->resolver()->setIgnoreAlreadyRecommended( true ); + getZYpp()->resolver()->setOnlyRequires( true ); + restore(); + getPi( "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(pool), + make_filter_end(pool) ) << endl; + verify(); + vdumpPoolStats( SEC << "Transacting:"<< endl, + make_filter_begin(pool), + make_filter_end(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(pool), + make_filter_end(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(pool), + make_filter_end(pool) ) << endl; + save(); + verify(); + } + } + + +#if 0 //getPi<>( "", "", Edition(""), Arch("") ); getPi( "SUSE_SLES", Edition("11"), Arch("ppc64") ).status().setTransact( true, ResStatus::USER ); getPi( "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; } diff --git a/package/libzypp.changes b/package/libzypp.changes index 2145d85..4c09ea3 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -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 -- 2.7.4