Author: schubi2 Date: Thu Feb 21 10:45:44 2008 New Revision: 8843 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8843&view=rev Log: - remove flag delete_unmaintained - cleanup resolver problems - add list which shows unmaintained packages. Will be needed if they break with the updated system in order to delete them. Modified: trunk/libzypp/zypp/UpgradeStatistics.cc trunk/libzypp/zypp/UpgradeStatistics.h trunk/libzypp/zypp/solver/detail/Resolver.h trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc Modified: trunk/libzypp/zypp/UpgradeStatistics.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/UpgradeStatistics.cc?rev=8843&r1=8842&r2=8843&view=diff ============================================================================== --- trunk/libzypp/zypp/UpgradeStatistics.cc (original) +++ trunk/libzypp/zypp/UpgradeStatistics.cc Thu Feb 21 10:45:44 2008 @@ -57,8 +57,6 @@ std::ostream & UpgradeStatistics::dumpOn( std::ostream & str ) const { - str << "===[options]========================================" << endl; - str << "delete_unmaintained? " << (delete_unmaintained?"Y":"N") << endl; str << "===[initial]========================================" << endl; str << "pre_todel " << pre_todel << endl; str << "pre_nocand " << pre_nocand << endl; Modified: trunk/libzypp/zypp/UpgradeStatistics.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/UpgradeStatistics.h?rev=8843&r1=8842&r2=8843&view=diff ============================================================================== --- trunk/libzypp/zypp/UpgradeStatistics.h (original) +++ trunk/libzypp/zypp/UpgradeStatistics.h Thu Feb 21 10:45:44 2008 @@ -51,30 +51,16 @@ /////////////////////////////////////////////////////////////////// /** - * If true, dropped SuSE Packages will be preselected to delete - **/ - bool delete_unmaintained; - - /** * If true, version downgrades are silently performed. Assuming the * installation media contains a consistent sytem, and we target * this well defined state. **/ bool silent_downgrades; - /** - * If false, the upgrade algorithm will tag all installed patches to - * be deleted. Note, that this will not delete any packages. Just the - * patch metadata are removed. - **/ - bool keep_installed_patches; - public: UpgradeOptions() - : delete_unmaintained ( false ) - , silent_downgrades ( false ) - , keep_installed_patches( true ) + : silent_downgrades ( false ) {} ~UpgradeOptions() {} @@ -236,10 +222,7 @@ **/ unsigned totalToDelete() const { - unsigned ret = chk_already_todel; - if ( delete_unmaintained ) - ret += chk_dropped; - return ret; + return chk_already_todel + chk_dropped; } /** @@ -247,10 +230,7 @@ **/ unsigned totalToKeep() const { - unsigned ret = chk_is_taboo + chk_to_keep_downgrade + chk_to_keep_installed + chk_keep_foreign; - if ( !delete_unmaintained ) - ret += chk_dropped; - return ret; + return chk_is_taboo + chk_to_keep_downgrade + chk_to_keep_installed + chk_keep_foreign + chk_dropped; } }; Modified: trunk/libzypp/zypp/solver/detail/Resolver.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.h?rev=8843&r1=8842&r2=8843&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Resolver.h (original) +++ trunk/libzypp/zypp/solver/detail/Resolver.h Thu Feb 21 10:45:44 2008 @@ -69,7 +69,10 @@ bool _testing; // list of problematic items after doUpgrade() - PoolItemList _update_items; + PoolItemList _problem_items; + + // list of not supported packages + PoolItemList _unmaintained_items; CapabilitySet _extra_requires; CapabilitySet _extra_conflicts; @@ -144,7 +147,7 @@ bool resolvePool(); void doUpgrade( zypp::UpgradeStatistics & opt_stats_r ); - PoolItemList problematicUpdateItems( void ) const { return _update_items; } + PoolItemList problematicUpdateItems( void ) const { return _problem_items; } ResolverProblemList problems () const; void applySolutions (const ProblemSolutionList &solutions); Modified: trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc?rev=8843&r1=8842&r2=8843&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc (original) +++ trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc Thu Feb 21 10:45:44 2008 @@ -230,16 +230,15 @@ MIL << "target at " << target << endl; MIL << "doUpgrade start... " - << "(delete_unmaintained:" << (opt_stats_r.delete_unmaintained?"yes":"no") << ")" << "(silent_downgrades:" << (opt_stats_r.silent_downgrades?"yes":"no") << ")" - << "(keep_installed_patches:" << (opt_stats_r.keep_installed_patches?"yes":"no") << ")" << endl; // create a testcase for the updating system Testcase testcase("/var/log/updateTestcase"); testcase.createTestcase (*this, true, false); // create pool, do not solve - _update_items.clear(); + _unmaintained_items.clear(); + _problem_items.clear(); { UpgradeOptions opts( opt_stats_r ); opt_stats_r = UpgradeStatistics(); @@ -360,32 +359,24 @@ if ( installed.status().isLocked() ) { // skip locked MIL << "SKIP taboo: " << installed << endl; ++opt_stats_r.chk_is_taboo; - _update_items.push_back( installed ); // remember in problem list + _problem_items.push_back( installed ); // remember in problem list continue; } if ( isKind<Patch>(installed.resolvable()) || isKind<Atom>(installed.resolvable()) || isKind<Script>(installed.resolvable()) - || isKind<Message>(installed.resolvable()) ) - { - if ( ! opt_stats_r.keep_installed_patches ) - { - if ( isKind<Patch>(installed.resolvable()) ) - MIL << "OUTDATED Patch: " << installed << endl; - installed.status().setToBeUninstalled( ResStatus::APPL_HIGH ); - } - else - { - if ( isKind<Patch>(installed.resolvable()) ) - MIL << "SKIP Patch: " << installed << endl; - } - continue; - } + || isKind<Message>(installed.resolvable()) + || isKind<Pattern>(installed.resolvable())) + { + MIL << "Delete old: " << installed << endl; + installed.status().setToBeUninstalled( ResStatus::APPL_HIGH ); + continue; + } CandidateMap::iterator cand_it = candidatemap.find( installed ); - bool probably_dropped = false; + bool can_be_dropped = false; MIL << "REPLACEMENT FOR " << installed << endl; /////////////////////////////////////////////////////////////////// @@ -496,8 +487,8 @@ if (otherVendorFound) { MIL << " only resolvable with other vendor found ==> do nothing" << endl; } else { - MIL << " ==> (dropped)" << endl; - probably_dropped = true; + MIL << " ==> dropp if it does not fit to the system" << endl; + can_be_dropped = true; } break; case 1: @@ -521,9 +512,8 @@ // now handle dropped package /////////////////////////////////////////////////////////////////// - if ( probably_dropped ) { - ++opt_stats_r.chk_dropped; - _update_items.push_back( installed ); + if ( can_be_dropped ) { + _unmaintained_items.push_back( installed ); } } // pass 1 end -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org