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>
64 inline bool HACKENV(
const char * var_r,
bool default_r )
67 const char * val = ::getenv( var_r );
71 if ( ret != default_r )
72 INT <<
"HACKENV " << var_r <<
" = " << ret << endl;
90 #define MAYBE_CLEANDEPS (cleandepsOnRemove()?SOLVER_CLEANDEPS:0)
99 IdString(solvable2->vendor) ) ? 0 : 1;
106 return std::string();
109 std::string ret( slv.asString() );
110 if ( ! slv.isSystem() )
123 INT <<
"id " << id_r <<
" not found in ZYPP pool." << endl;
132 os <<
"<resolver>" << endl;
134 #define OUTS(X) os << " " << #X << "\t= " << solver_get_flag(_satSolver, SOLVER_FLAG_##X) << endl
135 OUTS( ALLOW_DOWNGRADE );
136 OUTS( ALLOW_ARCHCHANGE );
137 OUTS( ALLOW_VENDORCHANGE );
138 OUTS( ALLOW_UNINSTALL );
139 OUTS( NO_UPDATEPROVIDE );
140 OUTS( SPLITPROVIDES );
141 OUTS( IGNORE_RECOMMENDED );
142 OUTS( ADD_ALREADY_RECOMMENDED );
143 OUTS( NO_INFARCHCHECK );
144 OUTS( ALLOW_NAMECHANGE );
145 OUTS( KEEP_EXPLICIT_OBSOLETES );
146 OUTS( BEST_OBEY_POLICY );
147 OUTS( NO_AUTOTARGET );
148 OUTS( DUP_ALLOW_DOWNGRADE );
149 OUTS( DUP_ALLOW_ARCHCHANGE );
150 OUTS( DUP_ALLOW_VENDORCHANGE );
151 OUTS( DUP_ALLOW_NAMECHANGE );
152 OUTS( KEEP_ORPHANS );
153 OUTS( BREAK_ORPHANS );
154 OUTS( FOCUS_INSTALLED );
155 OUTS( YUM_OBSOLETES );
157 os <<
" distupgrade = " << _distupgrade << endl;
158 os <<
" distupgrade_removeunsupported = " << _distupgrade_removeunsupported << endl;
159 os <<
" solveSrcPackages = " << _solveSrcPackages << endl;
160 os <<
" cleandepsOnRemove = " << _cleandepsOnRemove << endl;
161 os <<
" fixsystem = " << _fixsystem << endl;
165 return os <<
"<resolver/>" << endl;
175 , _allowdowngrade(false)
176 , _allowarchchange(false)
177 , _allowvendorchange(
ZConfig::instance().solver_allowVendorChange())
178 , _allowuninstall(false)
179 , _dup_allowdowngrade( true )
180 , _dup_allownamechange( true )
181 , _dup_allowarchchange( true )
182 , _dup_allowvendorchange( true )
183 , _updatesystem(false)
184 , _noupdateprovide(false)
185 , _dosplitprovides(true)
186 , _onlyRequires(
ZConfig::instance().solver_onlyRequires())
187 , _ignorealreadyrecommended(true)
188 , _distupgrade(false)
189 , _distupgrade_removeunsupported(false)
190 , _solveSrcPackages(false)
191 , _cleandepsOnRemove(
ZConfig::instance().solver_cleandepsOnRemove())
266 for (PoolItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
284 for (PoolItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
322 _XDEBUG(
"SATSolutionToPool install returns " << item <<
", " << r);
326 _XDEBUG(
"SATSolutionToPool upgrade returns " << item <<
", " << r);
330 _XDEBUG(
"SATSolutionToPool remove returns " << item <<
", " << r);
464 queue_push( &(
_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
468 queue_push( &(
_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
472 queue_push( &(
_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
476 queue_push( &(
_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
492 #define HACKENV(X,D) solver_set_flag(_satSolver, X, env::HACKENV( #X, D ) );
502 MIL <<
"Starting solving...." << endl;
505 MIL <<
"....Solver end" << endl;
514 queue_init(&decisionq);
515 solver_get_decisionqueue(
_satSolver, &decisionq);
516 for (
int i = 0; i < decisionq.count; ++i )
526 queue_free(&decisionq);
532 bool mustCheckObsoletes =
false;
535 if (solver_get_decisionlevel(
_satSolver, it->id()) > 0)
544 functor::functorRef<bool,PoolItem> (info) );
550 if ( ! mustCheckObsoletes )
551 mustCheckObsoletes =
true;
555 if ( mustCheckObsoletes )
558 for_( it, obsoleted.poolItemBegin(), obsoleted.poolItemEnd() )
562 if ( status.transacts() && ! status.isToBeUninstalledDueToUpgrade() )
568 Queue recommendations;
572 queue_init(&recommendations);
573 queue_init(&suggestions);
574 queue_init(&orphaned);
575 queue_init(&unneeded);
576 solver_get_recommendations(
_satSolver, &recommendations, &suggestions, 0);
578 solver_get_unneeded(
_satSolver, &unneeded, 1);
580 for (
int i = 0; i < recommendations.count; ++i )
587 for (
int i = 0; i < suggestions.count; ++i )
595 for (
int i = 0; i < orphaned.count; ++i )
603 for (
int i = 0; i < unneeded.count; ++i )
609 queue_free(&recommendations);
610 queue_free(&suggestions);
611 queue_free(&orphaned);
612 queue_free(&unneeded);
615 Queue flags, solvableQueue;
618 queue_init(&solvableQueue);
623 functor::functorRef<bool,PoolItem> (collectPseudoInstalled) );
624 solver_trivial_installable(
_satSolver, &solvableQueue, &flags );
625 for (
int i = 0; i < solvableQueue.count; i++) {
629 if (flags.elements[i] == -1) {
631 _XDEBUG(
"SATSolutionToPool(" << item <<
" ) nonRelevant !");
632 }
else if (flags.elements[i] == 1) {
634 _XDEBUG(
"SATSolutionToPool(" << item <<
" ) satisfied !");
635 }
else if (flags.elements[i] == 0) {
637 _XDEBUG(
"SATSolutionToPool(" << item <<
" ) broken !");
640 queue_free(&(solvableQueue));
647 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
649 for_( iter2, rpmProviders.
begin(), rpmProviders.
end() ) {
652 MIL <<
"User requirement " << *iter <<
" sets " << poolItem << endl;
657 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
659 for_( iter2, rpmProviders.
begin(), rpmProviders.
end() ) {
662 MIL <<
"User conflict " << *iter <<
" sets " << poolItem << endl;
670 ERR <<
"Solverrun finished with an ERROR" << endl;
683 MIL <<
"SATResolver::solverInit()" << endl;
695 functor::functorRef<bool,PoolItem>(info) );
697 for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) {
698 Id
id = (*iter)->satSolvable().id();
700 ERR <<
"Weaken: " << *iter <<
" not found" << endl;
702 MIL <<
"Weaken dependencies of " << *iter << endl;
703 queue_push( &(
_jobQueue), SOLVER_WEAKENDEPS | SOLVER_SOLVABLE );
710 queue_push( &(
_jobQueue), SOLVER_NOOBSOLETES | SOLVER_SOLVABLE_NAME );
720 MIL <<
"Checking droplists ..." << endl;
726 if ( (*it)->onSystem() )
733 dumpRangeLine(
MIL <<
"Droplist for " << (*it)->candidateObj() <<
": " << droplist.size() <<
" ", droplist.begin(), droplist.end() ) << endl;
734 for_( cap, droplist.begin(), droplist.end() )
736 queue_push( &
_jobQueue, SOLVER_DROP_ORPHANED | SOLVER_SOLVABLE_NAME );
744 MIL <<
"Droplist processing is disabled." << endl;
766 const std::set<Repository> & upgradeRepos)
768 MIL <<
"SATResolver::resolvePool()" << endl;
774 Id
id = (*iter)->satSolvable().id();
776 ERR <<
"Install: " << *iter <<
" not found" << endl;
778 MIL <<
"Install " << *iter << endl;
779 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
785 Id
id = (*iter)->satSolvable().id();
787 ERR <<
"Delete: " << *iter <<
" not found" << endl;
789 MIL <<
"Delete " << *iter << endl;
795 for_( iter, upgradeRepos.begin(), upgradeRepos.end() )
797 queue_push( &(
_jobQueue), SOLVER_DISTUPGRADE | SOLVER_SOLVABLE_REPO );
798 queue_push( &(
_jobQueue), iter->get()->repoid );
799 MIL <<
"Upgrade repo " << *iter << endl;
802 for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
803 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
805 MIL <<
"Requires " << *iter << endl;
808 for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter != conflict_caps.end(); iter++) {
811 MIL <<
"Conflicts " << *iter << endl;
821 bool ret =
solving(requires_caps, conflict_caps);
823 (ret?
MIL:
WAR) <<
"SATResolver::resolvePool() done. Ret:" << ret << endl;
832 MIL <<
"SATResolver::resolvQueue()" << endl;
838 for (SolverQueueItemList::const_iterator iter = requestQueue.begin(); iter != requestQueue.end(); iter++) {
844 Id
id = (*iter)->satSolvable().id();
846 ERR <<
"Install: " << *iter <<
" not found" << endl;
848 MIL <<
"Install " << *iter << endl;
849 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
855 MIL <<
"Delete " << *iter << ident << endl;
869 MIL <<
"SATResolver::resolveQueue() done. Ret:" << ret << endl;
876 MIL <<
"SATResolver::doUpdate()" << endl;
890 queue_push( &(
_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
894 queue_push( &(
_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
898 queue_push( &(
_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
902 queue_push( &(
_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
917 MIL <<
"Starting solving for update...." << endl;
920 MIL <<
"....Solver end" << endl;
927 queue_init(&decisionq);
928 solver_get_decisionqueue(
_satSolver, &decisionq);
929 for (
int i = 0; i < decisionq.count; i++)
932 p = decisionq.elements[i];
942 ERR <<
"id " << p <<
" not found in ZYPP pool." << endl;
945 queue_free(&decisionq);
948 for (
int i =
_satSolver->pool->installed->start; i < _satSolver->
pool->installed->start +
_satSolver->pool->installed->nsolvables; i++)
950 if (solver_get_decisionlevel(
_satSolver, i) > 0)
960 functor::functorRef<bool,PoolItem> (info) );
968 ERR <<
"id " << i <<
" not found in ZYPP pool." << endl;
971 MIL <<
"SATResolver::doUpdate() done" << endl;
1036 Id dep, source, target;
1043 probr = solver_findproblemrule(
_satSolver, problem);
1044 switch (solver_ruleinfo(
_satSolver, probr, &source, &target, &dep))
1046 case SOLVER_RULE_DISTUPGRADE:
1048 ret =
str::form (
_(
"%s does not belong to a distupgrade repository"), s.
asString().c_str());
1050 case SOLVER_RULE_INFARCH:
1054 case SOLVER_RULE_UPDATE:
1058 case SOLVER_RULE_JOB:
1059 ret =
_(
"conflicting requests");
1061 case SOLVER_RULE_RPM:
1062 ret =
_(
"some dependency problem");
1064 case SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP:
1065 ret =
str::form (
_(
"nothing provides requested %s"), pool_dep2str(pool, dep));
1066 detail +=
_(
"Have you enabled all requested repositories?");
1068 case SOLVER_RULE_JOB_UNKNOWN_PACKAGE:
1069 ret =
str::form (
_(
"package %s does not exist"), pool_dep2str(pool, dep));
1070 detail +=
_(
"Have you enabled all requested repositories?");
1072 case SOLVER_RULE_JOB_UNSUPPORTED:
1073 ret =
_(
"unsupported request");
1075 case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
1076 ret =
str::form (
_(
"%s is provided by the system and cannot be erased"), pool_dep2str(pool, dep));
1078 case SOLVER_RULE_RPM_NOT_INSTALLABLE:
1082 case SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP:
1085 ret =
str::form (
_(
"nothing provides %s needed by %s"), pool_dep2str(pool, dep), s.
asString().c_str());
1087 case SOLVER_RULE_RPM_SAME_NAME:
1092 case SOLVER_RULE_RPM_PACKAGE_CONFLICT:
1095 ret =
str::form (
_(
"%s conflicts with %s provided by %s"), s.
asString().c_str(), pool_dep2str(pool, dep), s2.
asString().c_str());
1097 case SOLVER_RULE_RPM_PACKAGE_OBSOLETES:
1102 case SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES:
1105 ret =
str::form (
_(
"installed %s obsoletes %s provided by %s"), s.
asString().c_str(), pool_dep2str(pool, dep), s2.
asString().c_str());
1107 case SOLVER_RULE_RPM_SELF_CONFLICT:
1109 ret =
str::form (
_(
"solvable %s conflicts with %s provided by itself"), s.
asString().c_str(), pool_dep2str(pool, dep));
1111 case SOLVER_RULE_RPM_PACKAGE_REQUIRES:
1118 typedef list<PoolItem> ProviderList;
1119 ProviderList providerlistInstalled, providerlistUninstalled;
1120 for_( iter1, possibleProviders.
begin(), possibleProviders.
end() ) {
1124 for_( iter2, possibleProviders.
begin(), possibleProviders.
end() ) {
1135 providerlistInstalled.push_back(provider1);
1137 providerlistUninstalled.push_back(provider1);
1141 ret =
str::form (
_(
"%s requires %s, but this requirement cannot be provided"), s.
asString().c_str(), pool_dep2str(pool, dep));
1142 if (providerlistInstalled.size() > 0) {
1143 detail +=
_(
"deleted providers: ");
1144 for (ProviderList::const_iterator iter = providerlistInstalled.begin(); iter != providerlistInstalled.end(); iter++) {
1145 if (iter == providerlistInstalled.begin())
1151 if (providerlistUninstalled.size() > 0) {
1152 if (detail.size() > 0)
1153 detail +=
_(
"\nuninstallable providers: ");
1155 detail =
_(
"uninstallable providers: ");
1156 for (ProviderList::const_iterator iter = providerlistUninstalled.begin(); iter != providerlistUninstalled.end(); iter++) {
1157 if (iter == providerlistUninstalled.begin())
1177 Id problem, solution, element;
1183 MIL <<
"Encountered problems! Here are the solutions:\n" << endl;
1186 while ((problem = solver_next_problem(
_satSolver, problem)) != 0) {
1187 MIL <<
"Problem " << pcnt++ <<
":" << endl;
1188 MIL <<
"====================================" << endl;
1192 MIL << whatString << endl;
1193 MIL <<
"------------------------------------" << endl;
1194 ResolverProblem_Ptr resolverProblem =
new ResolverProblem (whatString, detail);
1197 while ((solution = solver_next_solution(
_satSolver, problem, solution)) != 0) {
1200 while ((element = solver_next_solutionelement(
_satSolver, problem, solution, element, &p, &rp)) != 0) {
1201 if (p == SOLVER_SOLUTION_JOB) {
1204 switch (
_jobQueue.elements[rp-1]&(SOLVER_SELECTMASK|SOLVER_JOBMASK))
1206 case SOLVER_INSTALL | SOLVER_SOLVABLE: {
1210 if (pool->installed && s.
get()->repo == pool->installed) {
1212 string description =
str::form (
_(
"remove lock to allow removal of %s"), s.
asString().c_str() );
1213 MIL << description << endl;
1218 MIL << description << endl;
1222 ERR <<
"SOLVER_INSTALL_SOLVABLE: No item found for " << s.
asString() << endl;
1226 case SOLVER_ERASE | SOLVER_SOLVABLE: {
1230 if (pool->installed && s.
get()->repo == pool->installed) {
1233 MIL << description << endl;
1237 string description =
str::form (
_(
"remove lock to allow installation of %s"),
itemToString( poolItem ).c_str());
1238 MIL << description << endl;
1242 ERR <<
"SOLVER_ERASE_SOLVABLE: No item found for " << s.
asString() << endl;
1246 case SOLVER_INSTALL | SOLVER_SOLVABLE_NAME:
1249 SolverQueueItemInstall_Ptr install =
1253 string description =
str::form (
_(
"do not install %s"), ident.
c_str() );
1254 MIL << description << endl;
1258 case SOLVER_ERASE | SOLVER_SOLVABLE_NAME:
1268 functor::functorRef<bool,PoolItem> (info) );
1270 SolverQueueItemDelete_Ptr del =
1275 MIL << description << endl;
1279 case SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES:
1282 string description =
"";
1285 if (system_requires.find(
Capability(what)) != system_requires.end()) {
1287 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1288 resolverProblem->setDescription(
_(
"This request will break your system!"));
1289 description =
_(
"ignore the warning of a broken system");
1290 description += string(
" (requires:")+pool_dep2str(pool, what)+
")";
1291 MIL << description << endl;
1294 description =
str::form (
_(
"do not ask to install a solvable providing %s"), pool_dep2str(pool, what));
1295 MIL << description << endl;
1300 case SOLVER_ERASE | SOLVER_SOLVABLE_PROVIDES:
1303 string description =
"";
1306 if (system_conflicts.find(
Capability(what)) != system_conflicts.end()) {
1308 resolverProblem->setDetails( resolverProblem->description() +
"\n" + resolverProblem->details() );
1309 resolverProblem->setDescription(
_(
"This request will break your system!"));
1310 description =
_(
"ignore the warning of a broken system");
1311 description += string(
" (conflicts:")+pool_dep2str(pool, what)+
")";
1312 MIL << description << endl;
1316 description =
str::form (
_(
"do not ask to delete all solvables providing %s"), pool_dep2str(pool, what));
1317 MIL << description << endl;
1322 case SOLVER_UPDATE | SOLVER_SOLVABLE:
1327 if (pool->installed && s.
get()->repo == pool->installed) {
1329 string description =
str::form (
_(
"do not install most recent version of %s"), s.
asString().c_str());
1330 MIL << description << endl;
1333 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE " << poolItem <<
" is not selected for installation" << endl;
1336 ERR <<
"SOLVER_INSTALL_SOLVABLE_UPDATE: No item found for " << s.
asString() << endl;
1341 MIL <<
"- do something different" << endl;
1342 ERR <<
"No valid solution available" << endl;
1345 }
else if (p == SOLVER_SOLUTION_INFARCH) {
1348 if (pool->installed && s.
get()->repo == pool->installed) {
1350 string description =
str::form (
_(
"keep %s despite the inferior architecture"), s.
asString().c_str());
1351 MIL << description << endl;
1355 string description =
str::form (
_(
"install %s despite the inferior architecture"), s.
asString().c_str());
1356 MIL << description << endl;
1359 }
else if (p == SOLVER_SOLUTION_DISTUPGRADE) {
1362 if (pool->installed && s.
get()->repo == pool->installed) {
1365 MIL << description << endl;
1369 string description =
str::form (
_(
"install %s from excluded repository"), s.
asString().c_str());
1370 MIL << description << endl;
1383 if (itemFrom && itemTo) {
1387 if ((illegal & POLICY_ILLEGAL_DOWNGRADE) != 0)
1390 MIL << description << endl;
1394 if ((illegal & POLICY_ILLEGAL_ARCHCHANGE) != 0)
1397 MIL << description << endl;
1401 if ((illegal & POLICY_ILLEGAL_VENDORCHANGE) != 0)
1405 string description =
str::form (
_(
"install %s (with vendor change)\n %s --> %s") ,
1407 ( s_vendor ? s_vendor.c_str() :
" (no vendor) " ),
1408 ( sd_vendor ? sd_vendor.c_str() :
" (no vendor) " ) );
1409 MIL << description << endl;
1415 MIL << description << endl;
1426 MIL << description << endl;
1433 resolverProblem->addSolution (problemSolution,
1434 problemSolution->
actionCount() > 1 ?
true :
false);
1435 MIL <<
"------------------------------------" << endl;
1442 resolverProblem->addSolution (problemSolution,
1444 MIL <<
"ignore some dependencies of " << item << endl;
1445 MIL <<
"------------------------------------" << endl;
1449 resolverProblems.push_back (resolverProblem);
1452 return resolverProblems;
1458 for (ProblemSolutionList::const_iterator iter = solutions.begin();
1459 iter != solutions.end(); ++iter) {
1460 ProblemSolution_Ptr solution = *iter;
1462 if (!solution->apply (dummyResolver))
1471 if (iter->status().isInstalled()) {
1472 MIL <<
"Lock installed item " << *iter << endl;
1473 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE );
1476 MIL <<
"Lock NOT installed item " << *iter << endl;
1486 std::set<IdString> unifiedByName;
1488 IdString ident( (*iter)->satSolvable().ident() );
1489 if ( unifiedByName.insert( ident ).second )
1493 MIL <<
"Keep NOT installed name " << ident <<
" (" << *iter <<
")" << endl;
1506 for (CapabilitySet::const_iterator iter = system_requires.begin(); iter != system_requires.end(); ++iter) {
1507 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES );
1509 MIL <<
"SYSTEM Requires " << *iter << endl;
1512 for (CapabilitySet::const_iterator iter = system_conflicts.begin(); iter != system_conflicts.end(); ++iter) {
1515 MIL <<
"SYSTEM Conflicts " << *iter << endl;
1526 if ( (*it)->isSystem() )
1529 queue_push( &(
_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_NAME | SOLVER_ESSENTIAL );
1530 queue_push( &(
_jobQueue), archrule.id() );
1541 ::solver_get_userinstalled(
_satSolver, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
1549 ::solver_get_userinstalled(
_satSolver, ret, GET_USERINSTALLED_NAMES );
Repository repository() const
The Repository this Solvable belongs to.
void addPoolItemToKeep(PoolItem item)
bool setTransactByValue(TransactByValue causer)
std::list< ProblemSolution_Ptr > ProblemSolutionList
int IdType
Generic Id type.
A Solvable object within the sat Pool.
const_iterator begin() const
Container of Solvable providing a Capability (read only).
detail::CSolvable * get() const
Expert backdoor.
void addFrontDescription(const std::string &description)
Set description text (prepend)
bool _dup_allownamechange
std::string alias() const
Short unique string to identify a repo.
bool isToBeUninstalledDueToUpgrade() const
static ZConfig & instance()
Singleton ctor.
bool operator()(PoolItem item)
void addPoolItemsToInstallFromList(PoolItemList &rl)
Class representing one possible solution to one problem found during resolving This problem solution ...
bool isToBeUninstalled() const
SATCollectTransact(SATResolver &r)
CheckIfUpdate(sat::Solvable installed_r)
ProblemSolutionCombi * problemSolution
SATResolver(const ResPool &pool, sat::detail::CPool *satPool)
bool operator()(PoolItem p)
const_iterator byKindBegin(const ResKind &kind_r) const
static const ResStatus toBeInstalled
::_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
void addPoolItemToLock(PoolItem item)
std::string asString() const
String representation "ident-edition.arch" or "noSolvable".
bool isSystem() const
Return whether this Solvable belongs to the system repo.
bool isUninstalled() const
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
int invokeOnEach(_Iterator begin_r, _Iterator end_r, _Filter filter_r, _Function fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
SolvableIterator solvablesEnd() const
Iterator behind the last Solvable.
void setOrphaned(bool toVal_r=true)
Access to the sat-pools string space.
void resetItemTransaction(PoolItem item)
std::list< PoolItem > PoolItemList
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
TraitsType::constPtrType constPtr
const_iterator end() const
std::list< SolverQueueItem_Ptr > SolverQueueItemList
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
byIdent_iterator byIdentEnd(const ByIdent &ident_r) const
ResPool::instance().proxy();.
static void SATSolutionToPool(PoolItem item, const ResStatus &status, const ResStatus::TransactByValue causer)
std::tr1::unordered_set< Capability > CapabilitySet
bool solving(const CapabilitySet &requires_caps=CapabilitySet(), const CapabilitySet &conflict_caps=CapabilitySet())
PoolItemList _items_to_lock
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
Select PoolItem by installed.
void addPoolItemToRemove(PoolItem item)
std::string SATprobleminfoString(Id problem, std::string &detail, Id &ignoreId)
std::string asString() const
Conversion to std::string
static const ResStatus toBeUninstalledDueToUpgrade
sat::detail::CSolver * _satSolver
std::unary_function< ResObject::constPtr, bool > ResObjectFilterFunctor
PoolItemList _items_to_remove
bool equivalent(const Vendor &lVendor, const Vendor &rVendor) const
Return whether two vendor strings shold be treated as the same vendor.
A mid layer class we should remove.
ResObject::constPtr resolvable() const
Returns the ResObject::constPtr.
bool solveSrcPackages() const
void addPoolItemToInstall(PoolItem item)
std::list< ResolverProblem_Ptr > ResolverProblemList
static Pool instance()
Singleton ctor.
bool _dup_allowvendorchange
SolvableIterator solvablesBegin() const
Iterator to the first Solvable.
const_iterator begin() const
Iterator pointing to the first Solvable.
const_iterator byKindEnd(const ResKind &kind_r) const
PoolItemList _items_to_keep
void addSingleAction(PoolItem item, const TransactionKind action)
Add a single action of an item.
sat::Solvable mapSolvable(const Id &id)
const_iterator end() const
Iterator pointing behind the last Solvable.
int vendorCheck(sat::detail::CPool *pool, Solvable *solvable1, Solvable *solvable2)
bool _ignorealreadyrecommended
std::unary_function< PoolItem, bool > PoolItemFilterFunctor
Interim helper class to collect global options and settings.
bool HACKENV(const char *var_r, bool default_r)
Class representing one possible solution to one problem found during resolving This problem solution ...
PoolItemList _problem_items
ResStatus & status() const
Returns the current status.
Chain< _ACondition, _BCondition > chain(_ACondition conda_r, _BCondition condb_r)
Convenience function for creating a Chain from two conditions conda_r and condb_r.
bool operator()(PoolItem item)
bool isPseudoInstalled(ResKind kind_r)
Those are denoted to be installed, if the solver verifies them as being satisfied.
void addPoolItemsToRemoveFromList(PoolItemList &rl)
void applySolutions(const ProblemSolutionList &solutions)
Container of installed Solvable which would be obsoleted by the Solvable passed to the ctor...
static const SystemCheck & instance()
Singleton.
bool solvablesEmpty() const
Whether Repository contains solvables.
const char * c_str() const
Conversion to const char *
bool setToBeUninstalled(TransactByValue causer)
FindPackage(ProblemSolutionCombi *p, const TransactionKind act)
std::ostream & dumpRangeLine(std::ostream &str, _Iterator begin, _Iterator end)
Print range defined by iterators (single line style).
sat::detail::CQueue _jobQueue
const CapabilitySet & conflictSystemCap() const
Returns a list of conflicting system capabilities.
CollectPseudoInstalled(Queue *queue)
Select PoolItem by transact.
bool _dup_allowarchchange
void addDescription(const std::string description)
Set description text (append)
Select PoolItem by uninstalled.
sat::detail::CPool * _satPool
bool resolveQueue(const SolverQueueItemList &requestQueue, const PoolItemList &weakItems)
Libsolv Id queue wrapper.
sat::StringQueue userInstalled() const
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
sat::Solvable buddy() const
Return the buddy we share our status object with.
sat::StringQueue autoInstalled() const
Pathname systemRoot() const
The target root directory.
TransactionKind
A problem solution action that performs a transaction (installs, removes, keep ...) one resolvable (package, patch, pattern, product).
PoolItem getPoolItem(Id id_r)
void setRecommended(bool toVal_r=true)
const CapabilitySet & requiredSystemCap() const
Returns a list of required system capabilities.
bool isToBeInstalled() const
PoolItemList _items_to_install
PoolItemList _result_items_to_install
bool resolvePool(const CapabilitySet &requires_caps, const CapabilitySet &conflict_caps, const PoolItemList &weakItems, const std::set< Repository > &upgradeRepos)
bool strToBool(const C_Str &str, bool default_r)
Parse str into a bool depending on the default value.
IMPL_PTR_TYPE(ProblemSolutionCombi)
void solverInit(const PoolItemList &weakItems)
int actionCount()
returns the number of actions
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
bool setToBeInstalled(TransactByValue causer)
sat::Solvable mapBuddy(const PoolItem &item_r)
bool operator()(PoolItem item)
PoolItemList _result_items_to_remove
PoolItem mapItem(const PoolItem &item)
Reference to a PoolItem connecting ResObject and ResStatus.
bool _distupgrade_removeunsupported
IdType id() const
Expert backdoor.
PoolItem find(const sat::Solvable &slv_r) const
Return the corresponding PoolItem.
virtual std::ostream & dumpOn(std::ostream &str) const
Overload to realize std::ostream & operator<<.
static const VendorAttr & instance()
Singleton.
void setUnneeded(bool toVal_r=true)
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
std::string itemToString(const PoolItem &item)
byIdent_iterator byIdentBegin(const ByIdent &ident_r) const
static const ResStatus toBeUninstalled
bool setToBeUninstalledDueToObsolete()
void setSystemRequirements()
ResolverProblemList problems()
void prepareForSolving() const
prepare plus some expensive checks done before solving only.
void setSuggested(bool toVal_r=true)
static ResPool instance()
Singleton ctor.