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;
95 bool _allowuninstall:1;
97 bool _noupdateprovide:1;
98 bool _dosplitprovides:1;
100 bool _ignorealreadyrecommended:1;
102 bool _distupgrade_removeunsupported:1;
107 bool _solveSrcPackages:1;
108 bool _cleandepsOnRemove:1;
114 std::string SATprobleminfoString (Id problem, std::string &detail, Id &ignoreId);
115 void resetItemTransaction (PoolItem item);
118 void solverInit(
const PoolItemList & weakItems);
127 void setSystemRequirements();
135 sat::Solvable mapSolvable (
const Id &
id);
136 PoolItem mapItem (
const PoolItem &item);
141 virtual ~SATResolver();
145 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
146 friend std::ostream&
operator<<(std::ostream&
str,
const SATResolver & obj)
147 {
return obj.dumpOn (str); }
149 ResPool pool (
void)
const;
150 void setPool (
const ResPool & pool) { _pool = pool; }
155 const PoolItemList & weakItems,
156 const std::set<Repository> & upgradeRepos
160 const PoolItemList & weakItems
168 bool fixsystem ()
const {
return _fixsystem;}
169 void setFixsystem (
const bool fixsystem) { _fixsystem = fixsystem;}
171 bool ignorealreadyrecommended ()
const {
return _ignorealreadyrecommended;}
172 void setIgnorealreadyrecommended (
const bool ignorealreadyrecommended) { _ignorealreadyrecommended = ignorealreadyrecommended;}
174 bool distupgrade ()
const {
return _distupgrade;}
175 void setDistupgrade (
const bool distupgrade) { _distupgrade = distupgrade;}
177 bool distupgrade_removeunsupported ()
const {
return _distupgrade_removeunsupported;}
178 void setDistupgrade_removeunsupported (
const bool distupgrade_removeunsupported) { _distupgrade_removeunsupported = distupgrade_removeunsupported;}
180 bool allowdowngrade ()
const {
return _allowdowngrade;}
181 void setAllowdowngrade (
const bool allowdowngrade) { _allowdowngrade = allowdowngrade;}
183 bool allowarchchange ()
const {
return _allowarchchange;}
184 void setAllowarchchange (
const bool allowarchchange) { _allowarchchange = allowarchchange;}
187 void setAllowvendorchange (
const bool allowvendorchange) {
_allowvendorchange = allowvendorchange;}
189 bool allowuninstall ()
const {
return _allowuninstall;}
190 void setAllowuninstall (
const bool allowuninstall) { _allowuninstall = allowuninstall;}
192 bool updatesystem ()
const {
return _updatesystem;}
193 void setUpdatesystem (
const bool updatesystem) { _updatesystem = updatesystem;}
195 bool noupdateprovide ()
const {
return _noupdateprovide;}
196 void setNoupdateprovide (
const bool noupdateprovide) { _noupdateprovide = noupdateprovide;}
198 bool dosplitprovides ()
const {
return _dosplitprovides;}
199 void setDosplitprovides (
const bool dosplitprovides) { _dosplitprovides = dosplitprovides;}
201 bool onlyRequires ()
const {
return _onlyRequires;}
202 void setOnlyRequires (
const bool onlyRequires) { _onlyRequires = onlyRequires;}
204 bool solveSrcPackages()
const {
return _solveSrcPackages; }
205 void setSolveSrcPackages(
bool state_r ) { _solveSrcPackages = state_r; }
207 bool cleandepsOnRemove()
const {
return _cleandepsOnRemove; }
208 void setCleandepsOnRemove(
bool state_r ) { _cleandepsOnRemove = state_r; }
210 PoolItemList problematicUpdateItems(
void )
const {
return _problem_items; }
211 PoolItemList problematicUpdateItems() {
return _problem_items; }
213 PoolItemList resultItemsToInstall () {
return _result_items_to_install; }
214 PoolItemList resultItemsToRemove () {
return _result_items_to_remove; }
229 #endif // ZYPP_USE_RESOLVER_INTERNALS 230 #endif // ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H std::list< ProblemSolution_Ptr > ProblemSolutionList
Common types used in the Resolver public API and need to be passed down to the details tree...
ResolverFocus
The resolvers general attitude.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
::_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
String related utilities and Regular expression matching.
std::list< SolverQueueItem_Ptr > SolverQueueItemList
::_Solver CSolver
Wrapped libsolv C data type exposed as backdoor.
Queue StringQueue
Queue with String ids.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::list< ResolverProblem_Ptr > ResolverProblemList
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
std::unordered_set< Capability > CapabilitySet
::_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Easy-to use interface to the ZYPP dependency resolver.