23 #include <solv/repo_solv.h> 24 #include <solv/poolarch.h> 26 #include <solv/poolvendor.h> 27 #include <solv/policy.h> 28 #include <solv/bitmap.h> 29 #include <solv/queue.h> 32 #define ZYPP_USE_RESOLVER_INTERNALS 58 #define XDEBUG(x) do { if (base::logger::isExcessive()) XXX << x << std::endl;} while (0) 60 #undef ZYPP_BASE_LOGGER_LOGGROUP 61 #define ZYPP_BASE_LOGGER_LOGGROUP "zypp::solver" 82 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_INSTALLED, 0 );
83 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_BEST, 0 );
86 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_INSTALLED, 1 );
87 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_BEST, 0 );
90 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_INSTALLED, 0 );
91 solver_set_flag( &satSolver_r, SOLVER_FLAG_FOCUS_BEST, 1 );
99 inline sat::Queue collectPseudoInstalled(
const ResPool & pool_r )
102 for (
const PoolItem & pi : pool_r )
110 inline void solverCopyBackWeak(
sat::detail::CSolver & satSolver_r, PoolItemList & orphanedItems_r )
114 sat::Queue recommendations;
115 sat::Queue suggestions;
116 ::solver_get_recommendations( &satSolver_r, recommendations, suggestions, 0 );
118 PoolItem(sat::Solvable(recommendations[i])).status().setRecommended(
true );
120 PoolItem(sat::Solvable(suggestions[i])).status().setSuggested(
true );
123 orphanedItems_r.clear();
125 ::solver_get_orphaned( &satSolver_r, orphaned );
128 PoolItem pi { sat::Solvable(orphaned[i]) };
129 pi.status().setOrphaned(
true );
130 orphanedItems_r.push_back( pi );
135 ::solver_get_unneeded( &satSolver_r, unneeded, 1 );
137 PoolItem(sat::Solvable(unneeded[i])).status().setUnneeded(
true );
142 inline void solverCopyBackValidate(
sat::detail::CSolver & satSolver_r,
const ResPool & pool_r )
144 sat::Queue pseudoItems { collectPseudoInstalled( pool_r ) };
145 if ( ! pseudoItems.empty() )
147 sat::Queue pseudoFlags;
148 ::solver_trivial_installable( &satSolver_r, pseudoItems, pseudoFlags );
152 PoolItem pi { sat::Solvable(pseudoItems[i]) };
153 switch ( pseudoFlags[i] )
155 case 0: pi.status().setBroken();
break;
156 case 1: pi.status().setSatisfied();
break;
157 case -1: pi.status().setNonRelevant();
break;
158 default: pi.status().setUndetermined();
break;
171 #define MAYBE_CLEANDEPS (cleandepsOnRemove()?SOLVER_CLEANDEPS:0) 180 IdString(solvable2->vendor) ) ? 0 : 1;
190 if ( ! pseudoItems_r.
empty() )
192 MIL <<
"Establish..." << endl;
194 ::pool_set_custom_vendorcheck( cPool, &
vendorCheck );
200 jobQueue.
push( SOLVER_NOOBSOLETES | SOLVER_SOLVABLE );
201 jobQueue.
push( solv.id() );
206 if ( ::solver_solve( cSolver, jobQueue ) != 0 )
207 INT <<
"How can establish fail?" << endl;
209 ::solver_trivial_installable( cSolver, pseudoItems_r, pseudoFlags_r );
214 switch ( pseudoFlags_r[i] )
216 case 0: pi.status().setBroken();
break;
217 case 1: pi.status().setSatisfied();
break;
218 case -1: pi.status().setNonRelevant();
break;
219 default: pi.status().setUndetermined();
break;
222 MIL <<
"Establish DONE" << endl;
225 MIL <<
"Establish not needed." << endl;
231 return std::string();
234 std::string ret( slv.asString() );
235 if ( ! slv.isSystem() )
249 os <<
"<resolver>" << endl;
251 #define OUTS(X) os << " " << #X << "\t= " << solver_get_flag(_satSolver, SOLVER_FLAG_##X) << endl 252 OUTS( ALLOW_DOWNGRADE );
253 OUTS( ALLOW_ARCHCHANGE );
254 OUTS( ALLOW_VENDORCHANGE );
255 OUTS( ALLOW_NAMECHANGE );
256 OUTS( ALLOW_UNINSTALL );
257 OUTS( NO_UPDATEPROVIDE );
258 OUTS( SPLITPROVIDES );
259 OUTS( IGNORE_RECOMMENDED );
260 OUTS( ADD_ALREADY_RECOMMENDED );
261 OUTS( NO_INFARCHCHECK );
262 OUTS( KEEP_EXPLICIT_OBSOLETES );
263 OUTS( BEST_OBEY_POLICY );
264 OUTS( NO_AUTOTARGET );
265 OUTS( DUP_ALLOW_DOWNGRADE );
266 OUTS( DUP_ALLOW_ARCHCHANGE );
267 OUTS( DUP_ALLOW_VENDORCHANGE );
268 OUTS( DUP_ALLOW_NAMECHANGE );
269 OUTS( KEEP_ORPHANS );
270 OUTS( BREAK_ORPHANS );
271 OUTS( YUM_OBSOLETES );
273 os <<
" focus = " << _focus << endl;
274 os <<
" distupgrade = " << _distupgrade << endl;
275 os <<
" distupgrade_removeunsupported = " << _distupgrade_removeunsupported << endl;
276 os <<
" solveSrcPackages = " << _solveSrcPackages << endl;
277 os <<
" cleandepsOnRemove = " << _cleandepsOnRemove << endl;
278 os <<
" fixsystem = " << _fixsystem << endl;
282 return os <<
"<resolver/>" << endl;
292 , _focus ( ZConfig::instance().solver_focus() )
294 , _allowdowngrade ( false )
295 , _allownamechange ( true )
296 , _allowarchchange ( false )
298 , _allowuninstall ( false )
299 , _updatesystem(false)
300 , _noupdateprovide ( false )
301 , _dosplitprovides ( true )
302 , _onlyRequires (ZConfig::instance().solver_onlyRequires())
303 , _ignorealreadyrecommended(true)
304 , _distupgrade(false)
305 , _distupgrade_removeunsupported(false)
310 , _solveSrcPackages(false)
311 , _cleandepsOnRemove(ZConfig::instance().solver_cleandepsOnRemove())
316 SATResolver::~SATResolver()
324 SATResolver::pool (
void)
const 346 XDEBUG(
"SATSolutionToPool install returns " << item <<
", " << r);
350 XDEBUG(
"SATSolutionToPool upgrade returns " << item <<
", " << r);
354 XDEBUG(
"SATSolutionToPool remove returns " << item <<
", " << r);
375 PoolItemList & items_to_remove_r,
376 PoolItemList & items_to_lock_r,
377 PoolItemList & items_to_keep_r,
378 bool solveSrcPackages_r )
379 : _items_to_install( items_to_install_r )
380 , _items_to_remove( items_to_remove_r )
381 , _items_to_lock( items_to_lock_r )
382 , _items_to_keep( items_to_keep_r )
383 , _solveSrcPackages( solveSrcPackages_r )
385 _items_to_install.clear();
386 _items_to_remove.clear();
387 _items_to_lock.clear();
388 _items_to_keep.clear();
395 bool by_solver = ( itemStatus.isBySolver() || itemStatus.isByApplLow() );
410 switch ( itemStatus.getTransactValue() )
413 itemStatus.isUninstalled() ? _items_to_install.push_back( item_r )
414 : _items_to_remove.push_back( item_r );
break;
446 : is_updated( false )
447 , _installed( installed_r )
471 _satSolver = solver_create( _satPool );
472 ::pool_set_custom_vendorcheck( _satPool, &
vendorCheck );
474 queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
475 queue_push( &(_jobQueue), 0 );
478 queue_push( &(_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
479 queue_push( &(_jobQueue), 0 );
482 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
483 queue_push( &(_jobQueue), 0 );
485 if (_distupgrade_removeunsupported) {
486 queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
487 queue_push( &(_jobQueue), 0 );
489 solverSetFocus( *_satSolver, _focus );
490 solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
491 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
492 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_NAMECHANGE, _allownamechange);
493 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
495 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
496 solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
497 solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
498 solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED,
false);
499 solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires);
508 MIL <<
"Starting solving...." << endl;
510 if ( solver_solve( _satSolver, &(_jobQueue) ) == 0 )
517 if ( _distupgrade_removeunsupported )
518 MIL <<
"Droplist processing not needed. RemoveUnsupported is On." << endl;
520 MIL <<
"Droplist processing is disabled in ZConfig." << endl;
523 bool resolve =
false;
524 MIL <<
"Checking droplists ..." << endl;
527 solver_get_decisionqueue( _satSolver, decisionq );
534 static const Capability productCap {
"product()" };
535 if ( slv && slv.provides().matches( productCap ) )
537 CapabilitySet droplist { slv.valuesOfNamespace(
"weakremover" ) };
538 MIL <<
"Droplist for " << slv <<
": size " << droplist.size() << endl;
539 if ( !droplist.empty() )
541 for (
const auto & cap : droplist )
543 queue_push( &_jobQueue, SOLVER_DROP_ORPHANED | SOLVER_SOLVABLE_NAME );
544 queue_push( &_jobQueue, cap.id() );
547 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
548 queue_push( &(_jobQueue),
id );
554 solver_solve( _satSolver, &(_jobQueue) );
558 MIL <<
"....Solver end" << endl;
562 _result_items_to_install.clear();
563 _result_items_to_remove.clear();
567 queue_init(&decisionq);
568 solver_get_decisionqueue(_satSolver, &decisionq);
569 for (
int i = 0; i < decisionq.count; ++i )
571 Id p = decisionq.elements[i];
576 if ( ! slv || slv.isSystem() )
579 PoolItem poolItem( slv );
581 _result_items_to_install.push_back( poolItem );
583 queue_free(&decisionq);
587 if ( systemRepo && ! systemRepo.solvablesEmpty() )
589 bool mustCheckObsoletes =
false;
590 for_( it, systemRepo.solvablesBegin(), systemRepo.solvablesEnd() )
592 if (solver_get_decisionlevel(_satSolver, it->id()) > 0)
596 CheckIfUpdate info( *it );
597 PoolItem poolItem( *it );
599 _pool.byIdentEnd( poolItem ),
600 resfilter::ByUninstalled(),
601 functor::functorRef<bool,PoolItem> (info) );
603 if (info.is_updated) {
607 if ( ! mustCheckObsoletes )
608 mustCheckObsoletes =
true;
610 _result_items_to_remove.push_back (poolItem);
612 if ( mustCheckObsoletes )
614 sat::WhatObsoletes obsoleted( _result_items_to_install.begin(), _result_items_to_install.end() );
615 for_( it, obsoleted.poolItemBegin(), obsoleted.poolItemEnd() )
617 ResStatus & status( it->status() );
619 if ( status.transacts() && ! status.isToBeUninstalledDueToUpgrade() )
620 status.setToBeUninstalledDueToObsolete();
627 solverCopyBackWeak( *_satSolver, _problem_items );
628 solverCopyBackValidate( *_satSolver, _pool );
633 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
634 sat::WhatProvides rpmProviders(*iter);
635 for_( iter2, rpmProviders.begin(), rpmProviders.end() ) {
636 PoolItem poolItem(*iter2);
637 if (poolItem.status().isToBeInstalled()) {
638 MIL <<
"User requirement " << *iter <<
" sets " << poolItem << endl;
643 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
644 sat::WhatProvides rpmProviders(*iter);
645 for_( iter2, rpmProviders.begin(), rpmProviders.end() ) {
646 PoolItem poolItem(*iter2);
647 if (poolItem.status().isToBeUninstalled()) {
648 MIL <<
"User conflict " << *iter <<
" sets " << poolItem << endl;
654 if (solver_problem_count(_satSolver) > 0 )
656 ERR <<
"Solverrun finished with an ERROR" << endl;
665 SATResolver::solverInit(
const PoolItemList & weakItems)
668 MIL <<
"SATResolver::solverInit()" << endl;
672 queue_init( &_jobQueue );
676 SATCollectTransact collector( _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep, solveSrcPackages() );
677 invokeOnEach ( _pool.begin(), _pool.end(), functor::functorRef<bool,PoolItem>( collector ) );
680 for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) {
681 Id
id = (*iter)->satSolvable().id();
683 ERR <<
"Weaken: " << *iter <<
" not found" << endl;
685 MIL <<
"Weaken dependencies of " << *iter << endl;
686 queue_push( &(_jobQueue), SOLVER_WEAKENDEPS | SOLVER_SOLVABLE );
687 queue_push( &(_jobQueue),
id );
692 queue_push( &(_jobQueue), SOLVER_BLACKLIST|SOLVER_SOLVABLE_PROVIDES );
694 queue_push( &(_jobQueue), SOLVER_BLACKLIST|SOLVER_SOLVABLE_PROVIDES );
700 const auto & trackedLocaleIds( myPool().trackedLocaleIds() );
703 for (
const auto & locale : trackedLocaleIds.added() )
705 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
709 for (
const auto & locale : trackedLocaleIds.removed() )
711 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES | SOLVER_CLEANDEPS );
717 for (
const sat::Solvable & solv : myPool().multiversionList() )
719 queue_push( &(_jobQueue), SOLVER_NOOBSOLETES | SOLVER_SOLVABLE );
720 queue_push( &(_jobQueue), solv.id() );
723 ::pool_add_userinstalled_jobs(_satPool,
sat::Pool::instance().autoInstalled(), &(_jobQueue), GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED);
727 SATResolver::solverEnd()
732 solver_free(_satSolver);
734 queue_free( &(_jobQueue) );
740 SATResolver::resolvePool(
const CapabilitySet & requires_caps,
742 const PoolItemList & weakItems,
743 const std::set<Repository> & upgradeRepos)
745 MIL <<
"SATResolver::resolvePool()" << endl;
748 solverInit(weakItems);
750 for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
751 Id
id = (*iter)->satSolvable().id();
753 ERR <<
"Install: " << *iter <<
" not found" << endl;
755 MIL <<
"Install " << *iter << endl;
756 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
757 queue_push( &(_jobQueue),
id );
761 for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) {
762 Id
id = (*iter)->satSolvable().id();
764 ERR <<
"Delete: " << *iter <<
" not found" << endl;
766 MIL <<
"Delete " << *iter << endl;
767 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE |
MAYBE_CLEANDEPS );
768 queue_push( &(_jobQueue),
id);
772 for_( iter, upgradeRepos.begin(), upgradeRepos.end() )
774 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE | SOLVER_SOLVABLE_REPO );
775 queue_push( &(_jobQueue), iter->get()->repoid );
776 MIL <<
"Upgrade repo " << *iter << endl;
779 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
780 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
781 queue_push( &(_jobQueue), iter->id() );
782 MIL <<
"Requires " << *iter << endl;
785 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
786 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
787 queue_push( &(_jobQueue), iter->id() );
788 MIL <<
"Conflicts " << *iter << endl;
792 setSystemRequirements();
798 bool ret = solving(requires_caps, conflict_caps);
800 (ret?
MIL:
WAR) <<
"SATResolver::resolvePool() done. Ret:" << ret << endl;
807 const PoolItemList & weakItems)
809 MIL <<
"SATResolver::resolvQueue()" << endl;
812 solverInit(weakItems);
815 for (SolverQueueItemList::const_iterator iter = requestQueue.begin(); iter != requestQueue.end(); iter++) {
816 (*iter)->addRule(_jobQueue);
820 for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
821 Id
id = (*iter)->satSolvable().id();
823 ERR <<
"Install: " << *iter <<
" not found" << endl;
825 MIL <<
"Install " << *iter << endl;
826 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
827 queue_push( &(_jobQueue),
id );
830 for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) {
832 MIL <<
"Delete " << *iter << ident << endl;
833 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_NAME |
MAYBE_CLEANDEPS );
834 queue_push( &(_jobQueue), ident);
838 setSystemRequirements();
844 bool ret = solving();
846 MIL <<
"SATResolver::resolveQueue() done. Ret:" << ret << endl;
851 void SATResolver::doUpdate()
853 MIL <<
"SATResolver::doUpdate()" << endl;
856 solverInit(PoolItemList());
859 setSystemRequirements();
864 _satSolver = solver_create( _satPool );
865 ::pool_set_custom_vendorcheck( _satPool, &
vendorCheck );
867 queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
868 queue_push( &(_jobQueue), 0 );
871 queue_push( &(_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
872 queue_push( &(_jobQueue), 0 );
875 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
876 queue_push( &(_jobQueue), 0 );
878 if (_distupgrade_removeunsupported) {
879 queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
880 queue_push( &(_jobQueue), 0 );
882 solverSetFocus( *_satSolver, _focus );
883 solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
884 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
885 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_NAMECHANGE, _allownamechange);
886 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
888 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
889 solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
890 solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
891 solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED,
false);
892 solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires);
897 MIL <<
"Starting solving for update...." << endl;
899 solver_solve( _satSolver, &(_jobQueue) );
900 MIL <<
"....Solver end" << endl;
907 queue_init(&decisionq);
908 solver_get_decisionqueue(_satSolver, &decisionq);
909 for (
int i = 0; i < decisionq.count; i++)
911 Id p = decisionq.elements[i];
916 if ( ! solv || solv.isSystem() )
921 queue_free(&decisionq);
924 for (
int i = _satSolver->pool->installed->start; i < _satSolver->pool->installed->start + _satSolver->pool->installed->nsolvables; i++)
926 if (solver_get_decisionlevel(_satSolver, i) > 0)
929 PoolItem poolItem( _pool.find( sat::Solvable(i) ) );
932 CheckIfUpdate info( (sat::Solvable(i)) );
934 _pool.byIdentEnd( poolItem ),
935 resfilter::ByUninstalled(),
936 functor::functorRef<bool,PoolItem> (info) );
938 if (info.is_updated) {
944 ERR <<
"id " << i <<
" not found in ZYPP pool." << endl;
950 solverCopyBackWeak( *_satSolver, _problem_items );
951 solverCopyBackValidate( *_satSolver, _pool );
953 MIL <<
"SATResolver::doUpdate() done" << endl;
973 : problemSolution (p)
980 problemSolution->addSingleAction (p, action);
1013 std::vector<std::string> SATResolver::SATgetCompleteProblemInfoStrings ( Id problem )
1015 std::vector<std::string> ret;
1016 sat::Queue problems;
1017 solver_findallproblemrules( _satSolver, problem, problems );
1023 SolverRuleinfo ruleClass = solver_ruleclass( _satSolver, problems[i]);
1024 if ( ruleClass != SolverRuleinfo::SOLVER_RULE_UPDATE && ruleClass != SolverRuleinfo::SOLVER_RULE_JOB ) {
1030 SolverRuleinfo ruleClass = solver_ruleclass( _satSolver, problems[i]);
1031 if ( nobad && ( ruleClass == SolverRuleinfo::SOLVER_RULE_UPDATE || ruleClass == SolverRuleinfo::SOLVER_RULE_JOB ) ) {
1037 std::string pInfo = SATproblemRuleInfoString( problems[i], detail, ignore );
1040 if ( std::find( ret.begin(), ret.end(), pInfo ) == ret.end() )
1041 ret.push_back( pInfo );
1046 std::string SATResolver::SATprobleminfoString(Id problem, std::string &detail, Id &ignoreId)
1050 Id probr = solver_findproblemrule(_satSolver, problem);
1051 return SATproblemRuleInfoString( probr, detail, ignoreId );
1054 std::string SATResolver::SATproblemRuleInfoString (Id probr, std::string &detail, Id &ignoreId)
1058 Id dep, source, target;
1059 SolverRuleinfo type = solver_ruleinfo(_satSolver, probr, &source, &target, &dep);
1063 sat::Solvable s = mapSolvable( source );
1064 sat::Solvable s2 = mapSolvable( target );
1071 case SOLVER_RULE_DISTUPGRADE:
1072 ret =
str::form (
_(
"%s does not belong to a distupgrade repository"), s.asString().c_str());
1074 case SOLVER_RULE_INFARCH:
1075 ret =
str::form (
_(
"%s has inferior architecture"), s.asString().c_str());
1077 case SOLVER_RULE_UPDATE:
1078 ret =
str::form (
_(
"problem with installed package %s"), s.asString().c_str());
1080 case SOLVER_RULE_JOB:
1081 ret =
_(
"conflicting requests");
1083 case SOLVER_RULE_PKG:
1084 ret =
_(
"some dependency problem");
1086 case SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP:
1087 ret =
str::form (
_(
"nothing provides requested %s"), pool_dep2str(pool, dep));
1088 detail +=
_(
"Have you enabled all requested repositories?");
1090 case SOLVER_RULE_JOB_UNKNOWN_PACKAGE:
1091 ret =
str::form (
_(
"package %s does not exist"), pool_dep2str(pool, dep));
1092 detail +=
_(
"Have you enabled all requested repositories?");
1094 case SOLVER_RULE_JOB_UNSUPPORTED:
1095 ret =
_(
"unsupported request");
1097 case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
1098 ret =
str::form (
_(
"%s is provided by the system and cannot be erased"), pool_dep2str(pool, dep));
1100 case SOLVER_RULE_PKG_NOT_INSTALLABLE:
1101 ret =
str::form (
_(
"%s is not installable"), s.asString().c_str());
1103 case SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP:
1105 ret =
str::form (
_(
"nothing provides %s needed by %s"), pool_dep2str(pool, dep), s.asString().c_str());
1107 case SOLVER_RULE_PKG_SAME_NAME:
1108 ret =
str::form (
_(
"cannot install both %s and %s"), s.asString().c_str(), s2.asString().c_str());
1110 case SOLVER_RULE_PKG_CONFLICTS:
1111 ret =
str::form (
_(
"%s conflicts with %s provided by %s"), s.asString().c_str(), pool_dep2str(pool, dep), s2.asString().c_str());
1113 case SOLVER_RULE_PKG_OBSOLETES:
1114 ret =
str::form (
_(
"%s obsoletes %s provided by %s"), s.asString().c_str(), pool_dep2str(pool, dep), s2.asString().c_str());
1116 case SOLVER_RULE_PKG_INSTALLED_OBSOLETES:
1117 ret =
str::form (
_(
"installed %s obsoletes %s provided by %s"), s.asString().c_str(), pool_dep2str(pool, dep), s2.asString().c_str());
1119 case SOLVER_RULE_PKG_SELF_CONFLICT:
1120 ret =
str::form (
_(
"solvable %s conflicts with %s provided by itself"), s.asString().c_str(), pool_dep2str(pool, dep));
1122 case SOLVER_RULE_PKG_REQUIRES: {
1124 Capability cap(dep);
1125 sat::WhatProvides possibleProviders(cap);
1128 typedef std::list<PoolItem> ProviderList;
1129 ProviderList providerlistInstalled, providerlistUninstalled;
1130 for_( iter1, possibleProviders.begin(), possibleProviders.end() ) {
1134 for_( iter2, possibleProviders.begin(), possibleProviders.end() ) {
1137 && ( (provider1.status().isInstalled() && provider2.status().isUninstalled())
1138 || (provider2.status().isInstalled() && provider1.status().isUninstalled()) )) {
1144 if (provider1.status().isInstalled())
1145 providerlistInstalled.push_back(provider1);
1147 providerlistUninstalled.push_back(provider1);
1151 ret =
str::form (
_(
"%s requires %s, but this requirement cannot be provided"), s.asString().c_str(), pool_dep2str(pool, dep));
1152 if (providerlistInstalled.size() > 0) {
1153 detail +=
_(
"deleted providers: ");
1154 for (ProviderList::const_iterator iter = providerlistInstalled.begin(); iter != providerlistInstalled.end(); iter++) {
1155 if (iter == providerlistInstalled.begin())
1161 if (providerlistUninstalled.size() > 0) {
1162 if (detail.size() > 0)
1163 detail +=
_(
"\nnot installable providers: ");
1165 detail =
_(
"not installable providers: ");
1166 for (ProviderList::const_iterator iter = providerlistUninstalled.begin(); iter != providerlistUninstalled.end(); iter++) {
1167 if (iter == providerlistUninstalled.begin())
1176 DBG <<
"Unknown rule type(" << type <<
") going to query libsolv for rule information." << endl;
1177 ret =
str::asString( ::solver_problemruleinfo2str( _satSolver, type, static_cast<Id>(s.id()), static_cast<Id>(s2.id()), dep ) );
1185 SATResolver::problems ()
1188 if (_satSolver && solver_problem_count(_satSolver)) {
1192 Id problem, solution, element;
1193 sat::Solvable s, sd;
1195 CapabilitySet system_requires = SystemCheck::instance().requiredSystemCap();
1196 CapabilitySet system_conflicts = SystemCheck::instance().conflictSystemCap();
1198 MIL <<
"Encountered problems! Here are the solutions:\n" << endl;
1201 while ((problem = solver_next_problem(_satSolver, problem)) != 0) {
1202 MIL <<
"Problem " << pcnt++ <<
":" << endl;
1203 MIL <<
"====================================" << endl;
1206 std::string whatString = SATprobleminfoString (problem,detail,ignoreId);
1207 MIL << whatString << endl;
1208 MIL <<
"------------------------------------" << endl;
1209 ResolverProblem_Ptr resolverProblem =
new ResolverProblem (whatString, detail, SATgetCompleteProblemInfoStrings( problem ));
1212 while ((solution = solver_next_solution(_satSolver, problem, solution)) != 0) {
1214 ProblemSolutionCombi *problemSolution =
new ProblemSolutionCombi;
1215 while ((element = solver_next_solutionelement(_satSolver, problem, solution, element, &p, &rp)) != 0) {
1216 if (p == SOLVER_SOLUTION_JOB) {
1218 what = _jobQueue.elements[rp];
1219 switch (_jobQueue.elements[rp-1]&(SOLVER_SELECTMASK|SOLVER_JOBMASK))
1221 case SOLVER_INSTALL | SOLVER_SOLVABLE: {
1222 s = mapSolvable (what);
1223 PoolItem poolItem = _pool.find (s);
1225 if (pool->installed && s.get()->repo == pool->installed) {
1226 problemSolution->addSingleAction (poolItem, REMOVE);
1227 std::string description =
str::form (
_(
"remove lock to allow removal of %s"), s.asString().c_str() );
1228 MIL << description << endl;
1229 problemSolution->addDescription (description);
1231 problemSolution->addSingleAction (poolItem, KEEP);
1232 std::string description =
str::form (
_(
"do not install %s"), s.asString().c_str());
1233 MIL << description << endl;
1234 problemSolution->addDescription (description);
1237 ERR <<
"SOLVER_INSTALL_SOLVABLE: No item found for " << s.asString() << endl;
1241 case SOLVER_ERASE | SOLVER_SOLVABLE: {
1242 s = mapSolvable (what);
1243 PoolItem poolItem = _pool.find (s);
1245 if (pool->installed && s.get()->repo == pool->installed) {
1246 problemSolution->addSingleAction (poolItem, KEEP);
1247 std::string description =
str::form (
_(
"keep %s"), s.asString().c_str());
1248 MIL << description << endl;
1249 problemSolution->addDescription (description);
1251 problemSolution->addSingleAction (poolItem, UNLOCK);
1252 std::string description =
str::form (
_(
"remove lock to allow installation of %s"),
itemToString( poolItem ).c_str());
1253 MIL << description << endl;
1254 problemSolution->addDescription (description);
1257 ERR <<
"SOLVER_ERASE_SOLVABLE: No item found for " << s.asString() << endl;
1261 case SOLVER_INSTALL | SOLVER_SOLVABLE_NAME:
1263 IdString ident( what );
1264 SolverQueueItemInstall_Ptr install =
1265 new SolverQueueItemInstall(_pool, ident.asString(), false );
1266 problemSolution->addSingleAction (install, REMOVE_SOLVE_QUEUE_ITEM);
1268 std::string description =
str::form (
_(
"do not install %s"), ident.c_str() );
1269 MIL << description << endl;
1270 problemSolution->addDescription (description);
1273 case SOLVER_ERASE | SOLVER_SOLVABLE_NAME:
1277 IdString ident( what );
1278 FindPackage info (problemSolution, KEEP);
1280 _pool.byIdentEnd( ident ),
1282 resfilter::ByTransact ()),
1283 functor::functorRef<bool,PoolItem> (info) );
1285 SolverQueueItemDelete_Ptr del =
1286 new SolverQueueItemDelete(_pool, ident.asString(), false );
1287 problemSolution->addSingleAction (del, REMOVE_SOLVE_QUEUE_ITEM);
1289 std::string description =
str::form (
_(
"keep %s"), ident.c_str());
1290 MIL << description << endl;
1291 problemSolution->addDescription (description);
1294 case SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES:
1296 problemSolution->addSingleAction (Capability(what), REMOVE_EXTRA_REQUIRE);
1297 std::string description =
"";
1300 if (system_requires.find(Capability(what)) != system_requires.end()) {
1302 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1303 resolverProblem->setDescription(
_(
"This request will break your system!"));
1304 description =
_(
"ignore the warning of a broken system");
1305 description += std::string(
" (requires:")+pool_dep2str(pool, what)+
")";
1306 MIL << description << endl;
1307 problemSolution->addFrontDescription (description);
1309 description =
str::form (
_(
"do not ask to install a solvable providing %s"), pool_dep2str(pool, what));
1310 MIL << description << endl;
1311 problemSolution->addDescription (description);
1315 case SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES:
1317 problemSolution->addSingleAction (Capability(what), REMOVE_EXTRA_CONFLICT);
1318 std::string description =
"";
1321 if (system_conflicts.find(Capability(what)) != system_conflicts.end()) {
1323 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1324 resolverProblem->setDescription(
_(
"This request will break your system!"));
1325 description =
_(
"ignore the warning of a broken system");
1326 description += std::string(
" (conflicts:")+pool_dep2str(pool, what)+
")";
1327 MIL << description << endl;
1328 problemSolution->addFrontDescription (description);
1331 description =
str::form (
_(
"do not ask to delete all solvables providing %s"), pool_dep2str(pool, what));
1332 MIL << description << endl;
1333 problemSolution->addDescription (description);
1337 case SOLVER_UPDATE | SOLVER_SOLVABLE:
1339 s = mapSolvable (what);
1340 PoolItem poolItem = _pool.find (s);
1342 if (pool->installed && s.get()->repo == pool->installed) {
1343 problemSolution->addSingleAction (poolItem, KEEP);
1344 std::string description =
str::form (
_(
"do not install most recent version of %s"), s.asString().c_str());
1345 MIL << description << endl;
1346 problemSolution->addDescription (description);
1348 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE " << poolItem <<
" is not selected for installation" << endl;
1351 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE: No item found for " << s.asString() << endl;
1356 MIL <<
"- do something different" << endl;
1357 ERR <<
"No valid solution available" << endl;
1360 }
else if (p == SOLVER_SOLUTION_INFARCH) {
1361 s = mapSolvable (rp);
1362 PoolItem poolItem = _pool.find (s);
1363 if (pool->installed && s.get()->repo == pool->installed) {
1364 problemSolution->addSingleAction (poolItem, LOCK);
1365 std::string description =
str::form (
_(
"keep %s despite the inferior architecture"), s.asString().c_str());
1366 MIL << description << endl;
1367 problemSolution->addDescription (description);
1369 problemSolution->addSingleAction (poolItem, INSTALL);
1370 std::string description =
str::form (
_(
"install %s despite the inferior architecture"), s.asString().c_str());
1371 MIL << description << endl;
1372 problemSolution->addDescription (description);
1374 }
else if (p == SOLVER_SOLUTION_DISTUPGRADE) {
1375 s = mapSolvable (rp);
1376 PoolItem poolItem = _pool.find (s);
1377 if (pool->installed && s.get()->repo == pool->installed) {
1378 problemSolution->addSingleAction (poolItem, LOCK);
1379 std::string description =
str::form (
_(
"keep obsolete %s"), s.asString().c_str());
1380 MIL << description << endl;
1381 problemSolution->addDescription (description);
1383 problemSolution->addSingleAction (poolItem, INSTALL);
1384 std::string description =
str::form (
_(
"install %s from excluded repository"), s.asString().c_str());
1385 MIL << description << endl;
1386 problemSolution->addDescription (description);
1388 }
else if ( p == SOLVER_SOLUTION_BLACK ) {
1391 s = mapSolvable (rp);
1392 PoolItem poolItem = _pool.find (s);
1394 problemSolution->addSingleAction (poolItem, INSTALL);
1395 std::string description;
1396 if ( s.isRetracted() ) {
1398 description = str::Format(
_(
"install %1% although it has been retracted")) % s.asString();
1399 }
else if ( s.isPtf() ) {
1401 description = str::Format(
_(
"allow to install the PTF %1%")) % s.asString();
1404 description = str::Format(
_(
"install %1% although it is blacklisted")) % s.asString();
1406 MIL << description << endl;
1407 problemSolution->addDescription( description );
1408 }
else if ( p > 0 ) {
1410 s = mapSolvable (p);
1411 PoolItem itemFrom = _pool.find (s);
1416 sd = mapSolvable (rp);
1417 PoolItem itemTo = _pool.find (sd);
1418 if (itemFrom && itemTo) {
1419 problemSolution->addSingleAction (itemTo, INSTALL);
1420 int illegal = policy_is_illegal(_satSolver, s.get(), sd.get(), 0);
1422 if ((illegal & POLICY_ILLEGAL_DOWNGRADE) != 0)
1424 std::string description =
str::form (
_(
"downgrade of %s to %s"), s.asString().c_str(), sd.asString().c_str());
1425 MIL << description << endl;
1426 problemSolution->addDescription (description);
1429 if ((illegal & POLICY_ILLEGAL_ARCHCHANGE) != 0)
1431 std::string description =
str::form (
_(
"architecture change of %s to %s"), s.asString().c_str(), sd.asString().c_str());
1432 MIL << description << endl;
1433 problemSolution->addDescription (description);
1436 if ((illegal & POLICY_ILLEGAL_VENDORCHANGE) != 0)
1438 IdString s_vendor( s.vendor() );
1439 IdString sd_vendor( sd.vendor() );
1440 std::string description =
str::form (
_(
"install %s (with vendor change)\n %s --> %s") ,
1441 sd.asString().c_str(),
1442 ( s_vendor ? s_vendor.c_str() :
" (no vendor) " ),
1443 ( sd_vendor ? sd_vendor.c_str() :
" (no vendor) " ) );
1444 MIL << description << endl;
1445 problemSolution->addDescription (description);
1449 std::string description =
str::form (
_(
"replacement of %s with %s"), s.asString().c_str(), sd.asString().c_str());
1450 MIL << description << endl;
1451 problemSolution->addDescription (description);
1454 ERR << s.asString() <<
" or " << sd.asString() <<
" not found" << endl;
1460 std::string description =
str::form (
_(
"deinstallation of %s"), s.asString().c_str());
1461 MIL << description << endl;
1462 problemSolution->addDescription (description);
1463 problemSolution->addSingleAction (itemFrom, REMOVE);
1469 INT <<
"Unknown solution " << p << endl;
1473 resolverProblem->addSolution (problemSolution,
1474 problemSolution->actionCount() > 1 ? true :
false);
1475 MIL <<
"------------------------------------" << endl;
1480 PoolItem item = _pool.find (sat::Solvable(ignoreId));
1481 ProblemSolutionIgnore *problemSolution =
new ProblemSolutionIgnore(item);
1482 resolverProblem->addSolution (problemSolution,
1484 MIL <<
"ignore some dependencies of " << item << endl;
1485 MIL <<
"------------------------------------" << endl;
1489 resolverProblems.push_back (resolverProblem);
1492 return resolverProblems;
1496 { Resolver( _pool ).applySolutions( solutions ); }
1498 void SATResolver::setLocks()
1503 for (PoolItemList::const_iterator iter = _items_to_lock.begin(); iter != _items_to_lock.end(); ++iter) {
1505 if (iter->status().isInstalled()) {
1507 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
1508 queue_push( &(_jobQueue), ident );
1511 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE |
MAYBE_CLEANDEPS );
1512 queue_push( &(_jobQueue), ident );
1515 MIL <<
"Locked " << icnt <<
" installed items and " << acnt <<
" NOT installed items." << endl;
1521 std::set<IdString> unifiedByName;
1522 for (PoolItemList::const_iterator iter = _items_to_keep.begin(); iter != _items_to_keep.end(); ++iter) {
1523 IdString ident( (*iter)->satSolvable().ident() );
1524 if ( unifiedByName.insert( ident ).second )
1528 MIL <<
"Keep NOT installed name " << ident <<
" (" << *iter <<
")" << endl;
1529 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_NAME | SOLVER_WEAK |
MAYBE_CLEANDEPS );
1530 queue_push( &(_jobQueue), ident.id() );
1536 void SATResolver::setSystemRequirements()
1538 CapabilitySet system_requires = SystemCheck::instance().requiredSystemCap();
1539 CapabilitySet system_conflicts = SystemCheck::instance().conflictSystemCap();
1541 for (CapabilitySet::const_iterator iter = system_requires.begin(); iter != system_requires.end(); ++iter) {
1542 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
1543 queue_push( &(_jobQueue), iter->id() );
1544 MIL <<
"SYSTEM Requires " << *iter << endl;
1547 for (CapabilitySet::const_iterator iter = system_conflicts.begin(); iter != system_conflicts.end(); ++iter) {
1548 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
1549 queue_push( &(_jobQueue), iter->id() );
1550 MIL <<
"SYSTEM Conflicts " << *iter << endl;
1558 IdString rpm(
"rpm" );
1559 for_( it, pool.byIdentBegin(rpm), pool.byIdentEnd(rpm) )
1561 if ( (*it)->isSystem() )
1564 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_NAME | SOLVER_ESSENTIAL );
1565 queue_push( &(_jobQueue), archrule.id() );
1576 ::solver_get_userinstalled( _satSolver, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
1584 ::solver_get_userinstalled( _satSolver, ret, GET_USERINSTALLED_NAMES );
std::list< ProblemSolution_Ptr > ProblemSolutionList
int IdType
Generic Id type.
A Solvable object within the sat Pool.
PoolItemList & _items_to_remove
Focus on updating requested packages and their dependencies as much as possible.
static ZConfig & instance()
Singleton ctor.
bool isToBeInstalled() const
bool equivalent(const Vendor &lVendor, const Vendor &rVendor) const
Return whether two vendor strings should be treated as the same vendor.
static const IdString ptfToken
Indicator provides ptf()
ProblemSolutionCombi * problemSolution
PoolItem find(const sat::Solvable &slv_r) const
Return the corresponding PoolItem.
ResolverFocus
The resolvers general attitude.
bool operator()(PoolItem p)
Queue SolvableQueue
Queue with Solvable ids.
ResStatus & status() const
Returns the current status.
static const ResStatus toBeInstalled
std::ostream & dumpOn(std::ostream &str, const zypp::shared_ptr< void > &obj)
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
sat::Solvable buddy() const
Return the buddy we share our status object with.
const std::string & asString(const std::string &t)
Global asString() that works with std::string too.
Access to the sat-pools string space.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
bool sameNVRA(const SolvableType< Derived > &lhs, const Solvable &rhs)
Request the standard behavior (as defined in zypp.conf or 'Job')
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
std::list< SolverQueueItem_Ptr > SolverQueueItemList
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
static void SATSolutionToPool(PoolItem item, const ResStatus &status, const ResStatus::TransactByValue causer)
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
static const ResStatus toBeUninstalledDueToUpgrade
std::unary_function< ResObject::constPtr, bool > ResObjectFilterFunctor
void prepare() const
Update housekeeping data if necessary (e.g.
CheckIfUpdate(const sat::Solvable &installed_r)
Repository repository() const
The Repository this Solvable belongs to.
Queue StringQueue
Queue with String ids.
void push(value_type val_r)
Push a value to the end off the Queue.
void establish(sat::Queue &pseudoItems_r, sat::Queue &pseudoFlags_r)
ResPool helper to compute the initial status of Patches etc.
std::list< ResolverProblem_Ptr > ResolverProblemList
static Pool instance()
Singleton ctor.
Commit helper functor distributing PoolItem by status into lists.
bool operator()(const PoolItem &item)
int vendorCheck(sat::detail::CPool *pool, Solvable *solvable1, Solvable *solvable2)
std::unary_function< PoolItem, bool > PoolItemFilterFunctor
Focus on applying as little changes to the installed packages as needed.
bool multiversionInstall() const
detail::CPool * get() const
Expert backdoor.
PoolItemList & _items_to_lock
SATCollectTransact(PoolItemList &items_to_install_r, PoolItemList &items_to_remove_r, PoolItemList &items_to_lock_r, PoolItemList &items_to_keep_r, bool solveSrcPackages_r)
bool isPseudoInstalled(ResKind kind_r)
Those are denoted to be installed, if the solver verifies them as being satisfied.
::s_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
bool operator()(const PoolItem &item_r)
bool setToBeUninstalled(TransactByValue causer)
FindPackage(ProblemSolutionCombi *p, const TransactionKind act)
Libsolv Id queue wrapper.
PoolItemList & _items_to_keep
bool compareByNVR(const SolvableType< Derived > &lhs, const Solvable &rhs)
std::unordered_set< Capability > CapabilitySet
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
sat::Solvable mapBuddy(sat::Solvable item_r)
PoolItemList & _items_to_install
std::string alias() const
Short unique string to identify a repo.
::s_Solver CSolver
Wrapped libsolv C data type exposed as backdoor.
bool isToBeUninstalled() const
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Chain< TACondition, TBCondition > chain(TACondition conda_r, TBCondition condb_r)
Convenience function for creating a Chain from two conditions conda_r and condb_r.
bool setToBeInstalled(TransactByValue causer)
IMPL_PTR_TYPE(SATResolver)
Combining sat::Solvable and ResStatus.
Pathname systemRoot() const
The target root directory.
static const IdString retractedToken
Indicator provides retracted-patch-package()
bool isKind(const ResKind &kind_r) const
static const VendorAttr & instance()
Singleton.
int invokeOnEach(TIterator begin_r, TIterator end_r, TFilter filter_r, TFunction fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
std::string itemToString(const PoolItem &item)
Easy-to use interface to the ZYPP dependency resolver.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
Focus on installing the best version of the requested packages.
static const ResStatus toBeUninstalled
bool isToBeUninstalledDueToUpgrade() const
static ResPool instance()
Singleton ctor.