22 #ifndef ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H 23 #define ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H 24 #ifndef ZYPP_USE_RESOLVER_INTERNALS 25 #error Do not directly include this file! 29 #include <solv/solver.h> 30 #include <solv/pool.h> 65 class SATResolver :
public base::ReferenceCounted,
private base::NonCopyable,
private sat::detail::PoolMember
75 PoolItemList _problem_items;
78 PoolItemList _items_to_install;
79 PoolItemList _items_to_remove;
80 PoolItemList _items_to_lock;
81 PoolItemList _items_to_keep;
84 PoolItemList _result_items_to_install;
85 PoolItemList _result_items_to_remove;
91 bool _allowdowngrade:1;
92 bool _allownamechange:1;
93 bool _allowarchchange:1;
94 bool _allowvendorchange:1;
95 bool _allowuninstall:1;
97 bool _noupdateprovide:1;
98 bool _dosplitprovides:1;
100 bool _ignorealreadyrecommended:1;
102 bool _removeOrphaned:1;
103 bool _removeUnneeded:1;
104 bool _dup_allowdowngrade:1;
105 bool _dup_allownamechange:1;
106 bool _dup_allowarchchange:1;
107 bool _dup_allowvendorchange:1;
108 bool _solveSrcPackages:1;
109 bool _cleandepsOnRemove:1;
115 std::string SATprobleminfoString (Id problem, std::string &detail, Id &ignoreId);
116 std::string SATproblemRuleInfoString (Id rule, std::string &detail, Id &ignoreId);
117 std::vector<std::string> SATgetCompleteProblemInfoStrings ( Id problem );
118 void resetItemTransaction (PoolItem item);
121 void solverInit(
const PoolItemList & weakItems);
122 void solverInitSetLocks();
123 void solverInitSetSystemRequirements();
124 void solverInitSetModeJobsAndFlags();
126 void solverAddJobsFromPool();
141 sat::Solvable mapSolvable (
const Id &
id);
142 PoolItem mapItem (
const PoolItem &item);
147 virtual ~SATResolver();
151 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
152 friend std::ostream&
operator<<(std::ostream&
str,
const SATResolver & obj)
153 {
return obj.dumpOn (
str); }
155 ResPool pool (
void)
const;
156 void setPool (
const ResPool & pool) { _pool = pool; }
161 const PoolItemList & weakItems,
162 const std::set<Repository> & upgradeRepos
166 const PoolItemList & weakItems
174 bool fixsystem ()
const {
return _fixsystem;}
175 void setFixsystem (
const bool fixsystem) { _fixsystem = fixsystem;}
177 bool ignorealreadyrecommended ()
const {
return _ignorealreadyrecommended;}
178 void setIgnorealreadyrecommended (
const bool ignorealreadyrecommended) { _ignorealreadyrecommended = ignorealreadyrecommended;}
180 bool distupgrade ()
const {
return _distupgrade;}
181 void setDistupgrade (
const bool distupgrade) { _distupgrade = distupgrade;}
183 bool removeOrphaned ()
const {
return _removeOrphaned;}
184 void setRemoveOrphaned (
const bool removeOrphaned) { _removeOrphaned = removeOrphaned;}
186 bool allowdowngrade ()
const {
return _allowdowngrade;}
187 void setAllowdowngrade (
const bool allowdowngrade) { _allowdowngrade = allowdowngrade;}
189 bool allowarchchange ()
const {
return _allowarchchange;}
190 void setAllowarchchange (
const bool allowarchchange) { _allowarchchange = allowarchchange;}
192 bool allowvendorchange ()
const {
return _allowvendorchange;}
193 void setAllowvendorchange (
const bool allowvendorchange) { _allowvendorchange = allowvendorchange;}
195 bool allowuninstall ()
const {
return _allowuninstall;}
196 void setAllowuninstall (
const bool allowuninstall) { _allowuninstall = allowuninstall;}
198 bool updatesystem ()
const {
return _updatesystem;}
199 void setUpdatesystem (
const bool updatesystem) { _updatesystem = updatesystem;}
201 bool noupdateprovide ()
const {
return _noupdateprovide;}
202 void setNoupdateprovide (
const bool noupdateprovide) { _noupdateprovide = noupdateprovide;}
204 bool dosplitprovides ()
const {
return _dosplitprovides;}
205 void setDosplitprovides (
const bool dosplitprovides) { _dosplitprovides = dosplitprovides;}
210 bool solveSrcPackages()
const {
return _solveSrcPackages; }
211 void setSolveSrcPackages(
bool state_r ) { _solveSrcPackages = state_r; }
213 bool cleandepsOnRemove()
const {
return _cleandepsOnRemove; }
214 void setCleandepsOnRemove(
bool state_r ) { _cleandepsOnRemove = state_r; }
216 PoolItemList problematicUpdateItems(
void )
const {
return _problem_items; }
217 PoolItemList problematicUpdateItems() {
return _problem_items; }
219 PoolItemList resultItemsToInstall () {
return _result_items_to_install; }
220 PoolItemList resultItemsToRemove () {
return _result_items_to_remove; }
239 #endif // ZYPP_USE_RESOLVER_INTERNALS 240 #endif // ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H Common types used in the Resolver public API and need to be passed down to the details tree...
::s_Solver CSolver
Wrapped libsolv C data type exposed as backdoor.
Queue StringQueue
Queue with String ids.
ResolverFocus
The resolver's general attitude.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SolutionActionList &actionlist)
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::list< SolverQueueItem_Ptr > SolverQueueItemList
std::unordered_set< Capability > CapabilitySet
std::list< ResolverProblem_Ptr > ResolverProblemList
::s_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Easy-to use interface to the ZYPP dependency resolver.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::list< ProblemSolution_Ptr > ProblemSolutionList