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) 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 )
472 queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
473 queue_push( &(_jobQueue), 0 );
476 queue_push( &(_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
477 queue_push( &(_jobQueue), 0 );
480 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
481 queue_push( &(_jobQueue), 0 );
483 if (_distupgrade_removeunsupported) {
484 queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
485 queue_push( &(_jobQueue), 0 );
487 solverSetFocus( *_satSolver, _focus );
488 solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
489 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
490 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_NAMECHANGE, _allownamechange);
491 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
493 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
494 solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
495 solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
496 solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED,
false);
497 solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires);
506 MIL <<
"Starting solving...." << endl;
508 if ( solver_solve( _satSolver, &(_jobQueue) ) == 0 )
515 if ( _distupgrade_removeunsupported )
516 MIL <<
"Droplist processing not needed. RemoveUnsupported is On." << endl;
518 MIL <<
"Droplist processing is disabled in ZConfig." << endl;
521 bool resolve =
false;
522 MIL <<
"Checking droplists ..." << endl;
525 solver_get_decisionqueue( _satSolver, decisionq );
532 static const Capability productCap {
"product()" };
533 if ( slv && slv.provides().matches( productCap ) )
535 CapabilitySet droplist { slv.valuesOfNamespace(
"weakremover" ) };
536 MIL <<
"Droplist for " << slv <<
": size " << droplist.size() << endl;
537 if ( !droplist.empty() )
539 for (
const auto & cap : droplist )
541 queue_push( &_jobQueue, SOLVER_DROP_ORPHANED | SOLVER_SOLVABLE_NAME );
542 queue_push( &_jobQueue, cap.id() );
545 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
546 queue_push( &(_jobQueue),
id );
552 solver_solve( _satSolver, &(_jobQueue) );
556 MIL <<
"....Solver end" << endl;
560 _result_items_to_install.clear();
561 _result_items_to_remove.clear();
565 queue_init(&decisionq);
566 solver_get_decisionqueue(_satSolver, &decisionq);
567 for (
int i = 0; i < decisionq.count; ++i )
569 Id p = decisionq.elements[i];
574 if ( ! slv || slv.isSystem() )
577 PoolItem poolItem( slv );
579 _result_items_to_install.push_back( poolItem );
581 queue_free(&decisionq);
585 if ( systemRepo && ! systemRepo.solvablesEmpty() )
587 bool mustCheckObsoletes =
false;
588 for_( it, systemRepo.solvablesBegin(), systemRepo.solvablesEnd() )
590 if (solver_get_decisionlevel(_satSolver, it->id()) > 0)
594 CheckIfUpdate info( *it );
595 PoolItem poolItem( *it );
597 _pool.byIdentEnd( poolItem ),
598 resfilter::ByUninstalled(),
599 functor::functorRef<bool,PoolItem> (info) );
601 if (info.is_updated) {
605 if ( ! mustCheckObsoletes )
606 mustCheckObsoletes =
true;
608 _result_items_to_remove.push_back (poolItem);
610 if ( mustCheckObsoletes )
612 sat::WhatObsoletes obsoleted( _result_items_to_install.begin(), _result_items_to_install.end() );
613 for_( it, obsoleted.poolItemBegin(), obsoleted.poolItemEnd() )
615 ResStatus & status( it->status() );
617 if ( status.transacts() && ! status.isToBeUninstalledDueToUpgrade() )
618 status.setToBeUninstalledDueToObsolete();
625 solverCopyBackWeak( *_satSolver, _problem_items );
626 solverCopyBackValidate( *_satSolver, _pool );
631 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
632 sat::WhatProvides rpmProviders(*iter);
633 for_( iter2, rpmProviders.begin(), rpmProviders.end() ) {
634 PoolItem poolItem(*iter2);
635 if (poolItem.status().isToBeInstalled()) {
636 MIL <<
"User requirement " << *iter <<
" sets " << poolItem << endl;
641 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
642 sat::WhatProvides rpmProviders(*iter);
643 for_( iter2, rpmProviders.begin(), rpmProviders.end() ) {
644 PoolItem poolItem(*iter2);
645 if (poolItem.status().isToBeUninstalled()) {
646 MIL <<
"User conflict " << *iter <<
" sets " << poolItem << endl;
652 if (solver_problem_count(_satSolver) > 0 )
654 ERR <<
"Solverrun finished with an ERROR" << endl;
663 SATResolver::solverInit(
const PoolItemList & weakItems)
666 MIL <<
"SATResolver::solverInit()" << endl;
670 _satSolver = solver_create( _satPool );
674 bool toRelax =
false;
675 if ( _distupgrade ) {
676 for ( sat::Solvable solv : sat::WhatProvides( Capability(
"dup-vendor-relax(suse)") ) ) {
677 if ( ! solv.isSystem() ) {
678 MIL <<
"Relaxed vendor check requested by " << solv << endl;
687 queue_init( &_jobQueue );
691 SATCollectTransact collector( _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep, solveSrcPackages() );
692 invokeOnEach ( _pool.begin(), _pool.end(), functor::functorRef<bool,PoolItem>( collector ) );
695 for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) {
696 Id
id = (*iter)->satSolvable().id();
698 ERR <<
"Weaken: " << *iter <<
" not found" << endl;
700 MIL <<
"Weaken dependencies of " << *iter << endl;
701 queue_push( &(_jobQueue), SOLVER_WEAKENDEPS | SOLVER_SOLVABLE );
702 queue_push( &(_jobQueue),
id );
707 queue_push( &(_jobQueue), SOLVER_BLACKLIST|SOLVER_SOLVABLE_PROVIDES );
709 queue_push( &(_jobQueue), SOLVER_BLACKLIST|SOLVER_SOLVABLE_PROVIDES );
715 const auto & trackedLocaleIds( myPool().trackedLocaleIds() );
718 for (
const auto & locale : trackedLocaleIds.added() )
720 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
724 for (
const auto & locale : trackedLocaleIds.removed() )
726 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES | SOLVER_CLEANDEPS );
732 for (
const sat::Solvable & solv : myPool().multiversionList() )
734 queue_push( &(_jobQueue), SOLVER_NOOBSOLETES | SOLVER_SOLVABLE );
735 queue_push( &(_jobQueue), solv.id() );
738 ::pool_add_userinstalled_jobs(_satPool,
sat::Pool::instance().autoInstalled(), &(_jobQueue), GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED);
742 SATResolver::solverEnd()
747 solver_free(_satSolver);
749 queue_free( &(_jobQueue) );
755 SATResolver::resolvePool(
const CapabilitySet & requires_caps,
757 const PoolItemList & weakItems,
758 const std::set<Repository> & upgradeRepos)
760 MIL <<
"SATResolver::resolvePool()" << endl;
763 solverInit(weakItems);
765 for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
766 Id
id = (*iter)->satSolvable().id();
768 ERR <<
"Install: " << *iter <<
" not found" << endl;
770 MIL <<
"Install " << *iter << endl;
771 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
772 queue_push( &(_jobQueue),
id );
776 for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) {
777 Id
id = (*iter)->satSolvable().id();
779 ERR <<
"Delete: " << *iter <<
" not found" << endl;
781 MIL <<
"Delete " << *iter << endl;
782 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE |
MAYBE_CLEANDEPS );
783 queue_push( &(_jobQueue),
id);
787 for_( iter, upgradeRepos.begin(), upgradeRepos.end() )
789 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE | SOLVER_SOLVABLE_REPO );
790 queue_push( &(_jobQueue), iter->get()->repoid );
791 MIL <<
"Upgrade repo " << *iter << endl;
794 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
795 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
796 queue_push( &(_jobQueue), iter->id() );
797 MIL <<
"Requires " << *iter << endl;
800 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
801 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
802 queue_push( &(_jobQueue), iter->id() );
803 MIL <<
"Conflicts " << *iter << endl;
807 setSystemRequirements();
813 bool ret = solving(requires_caps, conflict_caps);
815 (ret?
MIL:
WAR) <<
"SATResolver::resolvePool() done. Ret:" << ret << endl;
822 const PoolItemList & weakItems)
824 MIL <<
"SATResolver::resolvQueue()" << endl;
827 solverInit(weakItems);
830 for (SolverQueueItemList::const_iterator iter = requestQueue.begin(); iter != requestQueue.end(); iter++) {
831 (*iter)->addRule(_jobQueue);
835 for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) {
836 Id
id = (*iter)->satSolvable().id();
838 ERR <<
"Install: " << *iter <<
" not found" << endl;
840 MIL <<
"Install " << *iter << endl;
841 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
842 queue_push( &(_jobQueue),
id );
845 for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) {
847 MIL <<
"Delete " << *iter << ident << endl;
848 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_NAME |
MAYBE_CLEANDEPS );
849 queue_push( &(_jobQueue), ident);
853 setSystemRequirements();
859 bool ret = solving();
861 MIL <<
"SATResolver::resolveQueue() done. Ret:" << ret << endl;
866 void SATResolver::doUpdate()
868 MIL <<
"SATResolver::doUpdate()" << endl;
871 solverInit(PoolItemList());
874 setSystemRequirements();
880 queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
881 queue_push( &(_jobQueue), 0 );
884 queue_push( &(_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
885 queue_push( &(_jobQueue), 0 );
888 queue_push( &(_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
889 queue_push( &(_jobQueue), 0 );
891 if (_distupgrade_removeunsupported) {
892 queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
893 queue_push( &(_jobQueue), 0 );
895 solverSetFocus( *_satSolver, _focus );
896 solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
897 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
898 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_NAMECHANGE, _allownamechange);
899 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
901 solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
902 solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
903 solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
904 solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED,
false);
905 solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires);
910 MIL <<
"Starting solving for update...." << endl;
912 solver_solve( _satSolver, &(_jobQueue) );
913 MIL <<
"....Solver end" << endl;
920 queue_init(&decisionq);
921 solver_get_decisionqueue(_satSolver, &decisionq);
922 for (
int i = 0; i < decisionq.count; i++)
924 Id p = decisionq.elements[i];
929 if ( ! solv || solv.isSystem() )
934 queue_free(&decisionq);
937 if ( _satSolver->pool->installed ) {
938 for (
int i = _satSolver->pool->installed->start; i < _satSolver->pool->installed->start + _satSolver->pool->installed->nsolvables; i++)
940 if (solver_get_decisionlevel(_satSolver, i) > 0)
943 PoolItem poolItem( _pool.find( sat::Solvable(i) ) );
946 CheckIfUpdate info( (sat::Solvable(i)) );
948 _pool.byIdentEnd( poolItem ),
949 resfilter::ByUninstalled(),
950 functor::functorRef<bool,PoolItem> (info) );
952 if (info.is_updated) {
958 ERR <<
"id " << i <<
" not found in ZYPP pool." << endl;
965 solverCopyBackWeak( *_satSolver, _problem_items );
966 solverCopyBackValidate( *_satSolver, _pool );
968 MIL <<
"SATResolver::doUpdate() done" << endl;
988 : problemSolution (p)
995 problemSolution->addSingleAction (p, action);
1028 std::vector<std::string> SATResolver::SATgetCompleteProblemInfoStrings ( Id problem )
1030 std::vector<std::string> ret;
1031 sat::Queue problems;
1032 solver_findallproblemrules( _satSolver, problem, problems );
1038 SolverRuleinfo ruleClass = solver_ruleclass( _satSolver, problems[i]);
1039 if ( ruleClass != SolverRuleinfo::SOLVER_RULE_UPDATE && ruleClass != SolverRuleinfo::SOLVER_RULE_JOB ) {
1045 SolverRuleinfo ruleClass = solver_ruleclass( _satSolver, problems[i]);
1046 if ( nobad && ( ruleClass == SolverRuleinfo::SOLVER_RULE_UPDATE || ruleClass == SolverRuleinfo::SOLVER_RULE_JOB ) ) {
1052 std::string pInfo = SATproblemRuleInfoString( problems[i], detail, ignore );
1055 if ( std::find( ret.begin(), ret.end(), pInfo ) == ret.end() )
1056 ret.push_back( pInfo );
1061 std::string SATResolver::SATprobleminfoString(Id problem, std::string &detail, Id &ignoreId)
1065 Id probr = solver_findproblemrule(_satSolver, problem);
1066 return SATproblemRuleInfoString( probr, detail, ignoreId );
1069 std::string SATResolver::SATproblemRuleInfoString (Id probr, std::string &detail, Id &ignoreId)
1073 Id dep, source, target;
1074 SolverRuleinfo type = solver_ruleinfo(_satSolver, probr, &source, &target, &dep);
1078 sat::Solvable s = mapSolvable( source );
1079 sat::Solvable s2 = mapSolvable( target );
1086 case SOLVER_RULE_DISTUPGRADE:
1088 ret = str::Format(
_(
"the installed %1% does not belong to a distupgrade repository and must be replaced") ) % s.asString();
1090 ret = str::Format(
_(
"the to be installed %1% does not belong to a distupgrade repository") ) % s.asString();
1092 case SOLVER_RULE_INFARCH:
1094 ret = str::Format(
_(
"the installed %1% has inferior architecture") ) % s.asString();
1096 ret = str::Format(
_(
"the to be installed %1% has inferior architecture") ) % s.asString();
1098 case SOLVER_RULE_UPDATE:
1099 ret = str::Format(
_(
"problem with the installed %1%") ) % s.asString();
1101 case SOLVER_RULE_JOB:
1102 ret =
_(
"conflicting requests");
1104 case SOLVER_RULE_PKG:
1105 ret =
_(
"some dependency problem");
1107 case SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP:
1108 ret = str::Format(
_(
"nothing provides the requested '%1%'") ) % pool_dep2str(pool, dep);
1109 detail +=
_(
"Have you enabled all the required repositories?");
1111 case SOLVER_RULE_JOB_UNKNOWN_PACKAGE:
1112 ret = str::Format(
_(
"the requested package %1% does not exist") ) % pool_dep2str(pool, dep);
1113 detail +=
_(
"Have you enabled all the required repositories?");
1115 case SOLVER_RULE_JOB_UNSUPPORTED:
1116 ret =
_(
"unsupported request");
1118 case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
1119 ret = str::Format(
_(
"'%1%' is provided by the system and cannot be erased") ) % pool_dep2str(pool, dep);
1121 case SOLVER_RULE_PKG_NOT_INSTALLABLE:
1122 ret = str::Format(
_(
"%1% is not installable") ) % s.asString();
1124 case SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP:
1127 ret = str::Format(
_(
"nothing provides '%1%' needed by the installed %2%") ) % pool_dep2str(pool, dep) % s.asString();
1129 ret = str::Format(
_(
"nothing provides '%1%' needed by the to be installed %2%") ) % pool_dep2str(pool, dep) % s.asString();
1131 case SOLVER_RULE_PKG_SAME_NAME:
1132 ret = str::Format(
_(
"cannot install both %1% and %2%") ) % s.asString() % s2.asString();
1134 case SOLVER_RULE_PKG_CONFLICTS:
1135 if ( s.isSystem() ) {
1136 if ( s2.isSystem() )
1137 ret = str::Format(
_(
"the installed %1% conflicts with '%2%' provided by the installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1139 ret = str::Format(
_(
"the installed %1% conflicts with '%2%' provided by the to be installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1142 if ( s2.isSystem() )
1143 ret = str::Format(
_(
"the to be installed %1% conflicts with '%2%' provided by the installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1145 ret = str::Format(
_(
"the to be installed %1% conflicts with '%2%' provided by the to be installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1148 case SOLVER_RULE_PKG_OBSOLETES:
1149 case SOLVER_RULE_PKG_INSTALLED_OBSOLETES:
1150 if ( s.isSystem() ) {
1151 if ( s2.isSystem() )
1152 ret = str::Format(
_(
"the installed %1% obsoletes '%2%' provided by the installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1154 ret = str::Format(
_(
"the installed %1% obsoletes '%2%' provided by the to be installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1157 if ( s2.isSystem() )
1158 ret = str::Format(
_(
"the to be installed %1% obsoletes '%2%' provided by the installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1160 ret = str::Format(
_(
"the to be installed %1% obsoletes '%2%' provided by the to be installed %3%") ) % s.asString() % pool_dep2str(pool, dep) % s2.asString();
1163 case SOLVER_RULE_PKG_SELF_CONFLICT:
1165 ret = str::Format(
_(
"the installed %1% conflicts with '%2%' provided by itself") ) % s.asString() % pool_dep2str(pool, dep);
1167 ret = str::Format(
_(
"the to be installed %1% conflicts with '%2%' provided by itself") ) % s.asString() % pool_dep2str(pool, dep);
1169 case SOLVER_RULE_PKG_REQUIRES: {
1171 Capability cap(dep);
1172 sat::WhatProvides possibleProviders(cap);
1175 typedef std::list<PoolItem> ProviderList;
1176 ProviderList providerlistInstalled, providerlistUninstalled;
1177 for_( iter1, possibleProviders.begin(), possibleProviders.end() ) {
1181 for_( iter2, possibleProviders.begin(), possibleProviders.end() ) {
1184 && ( (provider1.status().isInstalled() && provider2.status().isUninstalled())
1185 || (provider2.status().isInstalled() && provider1.status().isUninstalled()) )) {
1191 if (provider1.status().isInstalled())
1192 providerlistInstalled.push_back(provider1);
1194 providerlistUninstalled.push_back(provider1);
1199 ret = str::Format(
_(
"the installed %1% requires '%2%', but this requirement cannot be provided") ) % s.asString() % pool_dep2str(pool, dep);
1201 ret = str::Format(
_(
"the to be installed %1% requires '%2%', but this requirement cannot be provided") ) % s.asString() % pool_dep2str(pool, dep);
1202 if (providerlistInstalled.size() > 0) {
1203 detail +=
_(
"deleted providers: ");
1204 for (ProviderList::const_iterator iter = providerlistInstalled.begin(); iter != providerlistInstalled.end(); iter++) {
1205 if (iter == providerlistInstalled.begin())
1211 if (providerlistUninstalled.size() > 0) {
1212 if (detail.size() > 0)
1213 detail +=
_(
"\nnot installable providers: ");
1215 detail =
_(
"not installable providers: ");
1216 for (ProviderList::const_iterator iter = providerlistUninstalled.begin(); iter != providerlistUninstalled.end(); iter++) {
1217 if (iter == providerlistUninstalled.begin())
1226 DBG <<
"Unknown rule type(" << type <<
") going to query libsolv for rule information." << endl;
1227 ret =
str::asString( ::solver_problemruleinfo2str( _satSolver, type, static_cast<Id>(s.id()), static_cast<Id>(s2.id()), dep ) );
1235 SATResolver::problems ()
1238 if (_satSolver && solver_problem_count(_satSolver)) {
1242 Id problem, solution, element;
1243 sat::Solvable s, sd;
1245 CapabilitySet system_requires = SystemCheck::instance().requiredSystemCap();
1246 CapabilitySet system_conflicts = SystemCheck::instance().conflictSystemCap();
1248 MIL <<
"Encountered problems! Here are the solutions:\n" << endl;
1251 while ((problem = solver_next_problem(_satSolver, problem)) != 0) {
1252 MIL <<
"Problem " << pcnt++ <<
":" << endl;
1253 MIL <<
"====================================" << endl;
1256 std::string whatString = SATprobleminfoString (problem,detail,ignoreId);
1257 MIL << whatString << endl;
1258 MIL <<
"------------------------------------" << endl;
1259 ResolverProblem_Ptr resolverProblem =
new ResolverProblem (whatString, detail, SATgetCompleteProblemInfoStrings( problem ));
1262 while ((solution = solver_next_solution(_satSolver, problem, solution)) != 0) {
1264 ProblemSolutionCombi *problemSolution =
new ProblemSolutionCombi;
1265 while ((element = solver_next_solutionelement(_satSolver, problem, solution, element, &p, &rp)) != 0) {
1266 if (p == SOLVER_SOLUTION_JOB) {
1268 what = _jobQueue.elements[rp];
1269 switch (_jobQueue.elements[rp-1]&(SOLVER_SELECTMASK|SOLVER_JOBMASK))
1271 case SOLVER_INSTALL | SOLVER_SOLVABLE: {
1272 s = mapSolvable (what);
1273 PoolItem poolItem = _pool.find (s);
1275 if (pool->installed && s.get()->repo == pool->installed) {
1276 problemSolution->addSingleAction (poolItem, REMOVE);
1277 std::string description = str::Format(
_(
"remove lock to allow removal of %1%") ) % s.asString();
1278 MIL << description << endl;
1279 problemSolution->addDescription (description);
1281 problemSolution->addSingleAction (poolItem, KEEP);
1282 std::string description = str::Format(
_(
"do not install %1%") ) % s.asString();
1283 MIL << description << endl;
1284 problemSolution->addDescription (description);
1287 ERR <<
"SOLVER_INSTALL_SOLVABLE: No item found for " << s.asString() << endl;
1291 case SOLVER_ERASE | SOLVER_SOLVABLE: {
1292 s = mapSolvable (what);
1293 PoolItem poolItem = _pool.find (s);
1295 if (pool->installed && s.get()->repo == pool->installed) {
1296 problemSolution->addSingleAction (poolItem, KEEP);
1297 std::string description = str::Format(
_(
"keep %1%") ) % s.asString();
1298 MIL << description << endl;
1299 problemSolution->addDescription (description);
1301 problemSolution->addSingleAction (poolItem, UNLOCK);
1302 std::string description = str::Format(
_(
"remove lock to allow installation of %1%") ) %
itemToString( poolItem );
1303 MIL << description << endl;
1304 problemSolution->addDescription (description);
1307 ERR <<
"SOLVER_ERASE_SOLVABLE: No item found for " << s.asString() << endl;
1311 case SOLVER_INSTALL | SOLVER_SOLVABLE_NAME:
1313 IdString ident( what );
1314 SolverQueueItemInstall_Ptr install =
1315 new SolverQueueItemInstall(_pool, ident.asString(), false );
1316 problemSolution->addSingleAction (install, REMOVE_SOLVE_QUEUE_ITEM);
1318 std::string description = str::Format(
_(
"do not install %1%") ) % ident;
1319 MIL << description << endl;
1320 problemSolution->addDescription (description);
1323 case SOLVER_ERASE | SOLVER_SOLVABLE_NAME:
1327 IdString ident( what );
1328 FindPackage info (problemSolution, KEEP);
1330 _pool.byIdentEnd( ident ),
1332 resfilter::ByTransact ()),
1333 functor::functorRef<bool,PoolItem> (info) );
1335 SolverQueueItemDelete_Ptr del =
1336 new SolverQueueItemDelete(_pool, ident.asString(), false );
1337 problemSolution->addSingleAction (del, REMOVE_SOLVE_QUEUE_ITEM);
1339 std::string description = str::Format(
_(
"keep %1%") ) % ident;
1340 MIL << description << endl;
1341 problemSolution->addDescription (description);
1344 case SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES:
1346 problemSolution->addSingleAction (Capability(what), REMOVE_EXTRA_REQUIRE);
1347 std::string description =
"";
1350 if (system_requires.find(Capability(what)) != system_requires.end()) {
1352 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1353 resolverProblem->setDescription(
_(
"This request will break your system!"));
1354 description =
_(
"ignore the warning of a broken system");
1355 description += std::string(
" (requires:")+pool_dep2str(pool, what)+
")";
1356 MIL << description << endl;
1357 problemSolution->addFrontDescription (description);
1359 description = str::Format(
_(
"do not ask to install a solvable providing %1%") ) % pool_dep2str(pool, what);
1360 MIL << description << endl;
1361 problemSolution->addDescription (description);
1365 case SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES:
1367 problemSolution->addSingleAction (Capability(what), REMOVE_EXTRA_CONFLICT);
1368 std::string description =
"";
1371 if (system_conflicts.find(Capability(what)) != system_conflicts.end()) {
1373 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1374 resolverProblem->setDescription(
_(
"This request will break your system!"));
1375 description =
_(
"ignore the warning of a broken system");
1376 description += std::string(
" (conflicts:")+pool_dep2str(pool, what)+
")";
1377 MIL << description << endl;
1378 problemSolution->addFrontDescription (description);
1381 description = str::Format(
_(
"do not ask to delete all solvables providing %1%") ) % pool_dep2str(pool, what);
1382 MIL << description << endl;
1383 problemSolution->addDescription (description);
1387 case SOLVER_UPDATE | SOLVER_SOLVABLE:
1389 s = mapSolvable (what);
1390 PoolItem poolItem = _pool.find (s);
1392 if (pool->installed && s.get()->repo == pool->installed) {
1393 problemSolution->addSingleAction (poolItem, KEEP);
1394 std::string description = str::Format(
_(
"do not install most recent version of %1%") ) % s.asString();
1395 MIL << description << endl;
1396 problemSolution->addDescription (description);
1398 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE " << poolItem <<
" is not selected for installation" << endl;
1401 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE: No item found for " << s.asString() << endl;
1406 MIL <<
"- do something different" << endl;
1407 ERR <<
"No valid solution available" << endl;
1410 }
else if (p == SOLVER_SOLUTION_INFARCH) {
1411 s = mapSolvable (rp);
1412 PoolItem poolItem = _pool.find (s);
1413 if (pool->installed && s.get()->repo == pool->installed) {
1414 problemSolution->addSingleAction (poolItem, LOCK);
1415 std::string description = str::Format(
_(
"keep %1% despite the inferior architecture") ) % s.asString();
1416 MIL << description << endl;
1417 problemSolution->addDescription (description);
1419 problemSolution->addSingleAction (poolItem, INSTALL);
1420 std::string description = str::Format(
_(
"install %1% despite the inferior architecture") ) % s.asString();
1421 MIL << description << endl;
1422 problemSolution->addDescription (description);
1424 }
else if (p == SOLVER_SOLUTION_DISTUPGRADE) {
1425 s = mapSolvable (rp);
1426 PoolItem poolItem = _pool.find (s);
1427 if (pool->installed && s.get()->repo == pool->installed) {
1428 problemSolution->addSingleAction (poolItem, LOCK);
1429 std::string description = str::Format(
_(
"keep obsolete %1%") ) % s.asString();
1430 MIL << description << endl;
1431 problemSolution->addDescription (description);
1433 problemSolution->addSingleAction (poolItem, INSTALL);
1434 std::string description = str::Format(
_(
"install %1% from excluded repository") ) % s.asString();
1435 MIL << description << endl;
1436 problemSolution->addDescription (description);
1438 }
else if ( p == SOLVER_SOLUTION_BLACK ) {
1441 s = mapSolvable (rp);
1442 PoolItem poolItem = _pool.find (s);
1444 problemSolution->addSingleAction (poolItem, INSTALL);
1445 std::string description;
1446 if ( s.isRetracted() ) {
1448 description = str::Format(
_(
"install %1% although it has been retracted")) % s.asString();
1449 }
else if ( s.isPtf() ) {
1451 description = str::Format(
_(
"allow to install the PTF %1%")) % s.asString();
1454 description = str::Format(
_(
"install %1% although it is blacklisted")) % s.asString();
1456 MIL << description << endl;
1457 problemSolution->addDescription( description );
1458 }
else if ( p > 0 ) {
1460 s = mapSolvable (p);
1461 PoolItem itemFrom = _pool.find (s);
1466 sd = mapSolvable (rp);
1467 PoolItem itemTo = _pool.find (sd);
1468 if (itemFrom && itemTo) {
1469 problemSolution->addSingleAction (itemTo, INSTALL);
1470 int illegal = policy_is_illegal(_satSolver, s.get(), sd.get(), 0);
1472 if ((illegal & POLICY_ILLEGAL_DOWNGRADE) != 0)
1474 std::string description = str::Format(
_(
"downgrade of %1% to %2%") ) % s.asString() % sd.asString();
1475 MIL << description << endl;
1476 problemSolution->addDescription (description);
1479 if ((illegal & POLICY_ILLEGAL_ARCHCHANGE) != 0)
1481 std::string description = str::Format(
_(
"architecture change of %1% to %2%") ) % s.asString() % sd.asString();
1482 MIL << description << endl;
1483 problemSolution->addDescription (description);
1486 if ((illegal & POLICY_ILLEGAL_VENDORCHANGE) != 0)
1488 IdString s_vendor( s.vendor() );
1489 IdString sd_vendor( sd.vendor() );
1490 std::string description = str::Format(
_(
"install %1% (with vendor change)\n %2% --> %3%") ) % sd.asString() % ( s_vendor ? s_vendor.c_str() :
" (no vendor) " ) % ( sd_vendor ? sd_vendor.c_str() :
" (no vendor) " );
1491 MIL << description << endl;
1492 problemSolution->addDescription (description);
1496 std::string description = str::Format(
_(
"replacement of %1% with %2%") ) % s.asString() % sd.asString();
1497 MIL << description << endl;
1498 problemSolution->addDescription (description);
1501 ERR << s.asString() <<
" or " << sd.asString() <<
" not found" << endl;
1507 std::string description = str::Format(
_(
"deinstallation of %1%") ) % s.asString();
1508 MIL << description << endl;
1509 problemSolution->addDescription (description);
1510 problemSolution->addSingleAction (itemFrom, REMOVE);
1516 INT <<
"Unknown solution " << p << endl;
1520 resolverProblem->addSolution (problemSolution,
1521 problemSolution->actionCount() > 1 ? true :
false);
1522 MIL <<
"------------------------------------" << endl;
1527 PoolItem item = _pool.find (sat::Solvable(ignoreId));
1528 ProblemSolutionIgnore *problemSolution =
new ProblemSolutionIgnore(item);
1529 resolverProblem->addSolution (problemSolution,
1531 MIL <<
"ignore some dependencies of " << item << endl;
1532 MIL <<
"------------------------------------" << endl;
1536 resolverProblems.push_back (resolverProblem);
1539 return resolverProblems;
1543 { Resolver( _pool ).applySolutions( solutions ); }
1545 void SATResolver::setLocks()
1550 for (PoolItemList::const_iterator iter = _items_to_lock.begin(); iter != _items_to_lock.end(); ++iter) {
1552 if (iter->status().isInstalled()) {
1554 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
1555 queue_push( &(_jobQueue), ident );
1558 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE |
MAYBE_CLEANDEPS );
1559 queue_push( &(_jobQueue), ident );
1562 MIL <<
"Locked " << icnt <<
" installed items and " << acnt <<
" NOT installed items." << endl;
1568 std::set<IdString> unifiedByName;
1569 for (PoolItemList::const_iterator iter = _items_to_keep.begin(); iter != _items_to_keep.end(); ++iter) {
1570 IdString ident( (*iter)->satSolvable().ident() );
1571 if ( unifiedByName.insert( ident ).second )
1575 MIL <<
"Keep NOT installed name " << ident <<
" (" << *iter <<
")" << endl;
1576 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_NAME | SOLVER_WEAK |
MAYBE_CLEANDEPS );
1577 queue_push( &(_jobQueue), ident.id() );
1583 void SATResolver::setSystemRequirements()
1585 CapabilitySet system_requires = SystemCheck::instance().requiredSystemCap();
1586 CapabilitySet system_conflicts = SystemCheck::instance().conflictSystemCap();
1588 for (CapabilitySet::const_iterator iter = system_requires.begin(); iter != system_requires.end(); ++iter) {
1589 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
1590 queue_push( &(_jobQueue), iter->id() );
1591 MIL <<
"SYSTEM Requires " << *iter << endl;
1594 for (CapabilitySet::const_iterator iter = system_conflicts.begin(); iter != system_conflicts.end(); ++iter) {
1595 queue_push( &(_jobQueue), SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
1596 queue_push( &(_jobQueue), iter->id() );
1597 MIL <<
"SYSTEM Conflicts " << *iter << endl;
1605 IdString rpm(
"rpm" );
1606 for_( it, pool.byIdentBegin(rpm), pool.byIdentEnd(rpm) )
1608 if ( (*it)->isSystem() )
1611 queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_NAME | SOLVER_ESSENTIAL );
1612 queue_push( &(_jobQueue), archrule.id() );
1623 ::solver_get_userinstalled( _satSolver, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
1631 ::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
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 relaxedVendorCheck(sat::detail::CPool *pool, Solvable *solvable1, Solvable *solvable2)
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.
bool relaxedEquivalent(const Vendor &lVendor, const Vendor &rVendor) const
Like equivalent but always unifies suse and openSUSE vendor.
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()
(Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance.
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.