24#define ZYPP_USE_RESOLVER_INTERNALS
26#include <zypp/solver/detail/Resolver.h>
30#include <zypp/base/Logger.h>
49SolutionAction::SolutionAction()
54SolutionAction::~SolutionAction()
62TransactionSolutionAction::dumpOn( std::ostream& os)
const
64 os <<
"TransactionSolutionAction: ";
66 case KEEP: os <<
"Keep " << _item;
break;
67 case INSTALL: os <<
"Install " << _item;
break;
68 case REMOVE: os <<
"Remove " << _item;
break;
69 case UNLOCK: os <<
"Unlock " << _item;
break;
70 case LOCK: os <<
"Lock " << _item;
break;
71 case REMOVE_EXTRA_REQUIRE: os <<
"Remove require " << _capability;
break;
72 case REMOVE_EXTRA_CONFLICT: os <<
"Remove conflict " << _capability;
break;
73 case ADD_SOLVE_QUEUE_ITEM: os <<
"Add SolveQueueItem " << _solverQueueItem;
break;
74 case REMOVE_SOLVE_QUEUE_ITEM: os <<
"Remove SolveQueueItem " << _solverQueueItem;
break;
83 for (SolutionActionList::const_iterator iter = actionlist.begin(); iter != actionlist.end(); ++iter) {
93InjectSolutionAction::dumpOn( std::ostream& os )
const
95 os <<
"InjectSolutionAction: ";
97 case WEAK: os <<
"Weak";
break;
98 default: os <<
"Wrong kind";
break;
109SolutionAction::dumpOn( std::ostream & os )
const
111 os <<
"SolutionAction<";
112 os <<
"not specified";
128 if (_item.status().isToBeUninstalled())
134 if (_item.status().isToBeInstalled()) {
137 }
else if (_item.status().isInstalled())
144 if (!ret)
ERR <<
"Cannot unlock " << _item << endl;
149 if (!ret)
ERR <<
"Cannot lock " << _item << endl;
151 case REMOVE_EXTRA_REQUIRE:
152 resolver.removeExtraRequire (_capability);
154 case REMOVE_EXTRA_CONFLICT:
155 resolver.removeExtraConflict (_capability);
157 case ADD_SOLVE_QUEUE_ITEM:
158 resolver.addQueueItem(_solverQueueItem);
160 case REMOVE_SOLVE_QUEUE_ITEM:
161 resolver.removeQueueItem(_solverQueueItem);
164 ERR <<
"Wrong TransactionKind" << endl;
176 resolver.addWeak (_item);
179 ERR <<
"No valid InjectSolutionAction kind found" << endl;
Resolver ResolverInternal
Preferred name in API.
std::list< SolutionAction_Ptr > SolutionActionList
std::ostream & operator<<(std::ostream &os, const SolutionActionList &actionlist)
Easy-to use interface to the ZYPP dependency resolver.
#define IMPL_PTR_TYPE(NAME)