libzypp  13.10.6
Resolver.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* Resolver.cc
3  *
4  * Copyright (C) 2000-2002 Ximian, Inc.
5  * Copyright (C) 2005 SUSE Linux Products GmbH
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License,
9  * version 2, as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19  * 02111-1307, USA.
20  */
21 #include <boost/static_assert.hpp>
22 
27 
28 #include "zypp/Capabilities.h"
29 #include "zypp/ZConfig.h"
30 #include "zypp/base/Logger.h"
31 #include "zypp/base/String.h"
32 #include "zypp/base/Gettext.h"
33 #include "zypp/base/Algorithm.h"
34 #include "zypp/ResPool.h"
35 #include "zypp/ResFilters.h"
36 #include "zypp/sat/Pool.h"
37 #include "zypp/sat/Solvable.h"
38 #include "zypp/sat/Transaction.h"
39 #include "zypp/ResolverProblem.h"
40 
41 #define MAXSOLVERRUNS 5
42 
44 namespace zypp
45 {
46  namespace solver
48  {
49  namespace detail
51  {
52 
53 using namespace std;
54 
55 IMPL_PTR_TYPE(Resolver);
56 
57 
58 //---------------------------------------------------------------------------
59 
60 
61 std::ostream & Resolver::dumpOn( std::ostream & os ) const
62 {
63  os << "<resolver>" << endl;
64  #define OUTS(t) os << " " << #t << ":\t" << t << endl;
65  OUTS( _forceResolve );
66  OUTS( _upgradeMode );
67  OUTS( _updateMode );
68  OUTS( _verifying );
69  OUTS( _onlyRequires );
70  OUTS( _allowVendorChange );
71  OUTS( _solveSrcPackages );
72  OUTS( _cleandepsOnRemove );
73  OUTS( _ignoreAlreadyRecommended );
74  #undef OUT
75  return os << "<resolver/>";
76 }
77 
78 
79 //---------------------------------------------------------------------------
80 
82  : _pool(pool)
83  , _satResolver(NULL)
84  , _poolchanged(_pool.serial() )
85  , _forceResolve (false)
86  , _upgradeMode (false)
87  , _updateMode (false)
88  , _verifying (false)
89  , _onlyRequires ( ZConfig::instance().solver_onlyRequires() )
90  , _allowVendorChange ( ZConfig::instance().solver_allowVendorChange() )
91  , _solveSrcPackages ( false )
92  , _cleandepsOnRemove ( ZConfig::instance().solver_cleandepsOnRemove() )
93  , _ignoreAlreadyRecommended ( false )
94 
95 {
96  sat::Pool satPool( sat::Pool::instance() );
97  _satResolver = new SATResolver(_pool, satPool.get());
98 }
99 
100 
102 {
103  delete _satResolver;
104 }
105 
106 //---------------------------------------------------------------------------
107 
109 {
110  _allowVendorChange = indeterminate(state_r) ? ZConfig::instance().solver_allowVendorChange() : bool(state_r);
111 }
112 
114 {
115  _onlyRequires = indeterminate(state_r) ? ZConfig::instance().solver_onlyRequires() : bool(state_r);
116 }
117 
119 {
120  _cleandepsOnRemove = indeterminate(state_r) ? ZConfig::instance().solver_cleandepsOnRemove() : bool(state_r);
121 }
122 
123 //---------------------------------------------------------------------------
124 
126 { return _pool; }
127 
128 void Resolver::reset( bool keepExtras )
129 {
130  _verifying = false;
131 
132  if (!keepExtras) {
133  _extra_requires.clear();
134  _extra_conflicts.clear();
135  }
136 
137  _isInstalledBy.clear();
138  _installs.clear();
139  _satifiedByInstalled.clear();
140  _installedSatisfied.clear();
141 }
142 
144 {
145  // Setting Resolver to upgrade mode. SAT solver will do the update
146  _upgradeMode = true;
147  return resolvePool();
148 }
149 
151 {
152  _updateMode = true;
153  return _satResolver->doUpdate();
154 }
155 
158 
159 void Resolver::addExtraRequire( const Capability & capability )
160 { _extra_requires.insert (capability); }
161 
162 void Resolver::removeExtraRequire( const Capability & capability )
163 { _extra_requires.erase (capability); }
164 
165 void Resolver::addExtraConflict( const Capability & capability )
166 { _extra_conflicts.insert (capability); }
167 
168 void Resolver::removeExtraConflict( const Capability & capability )
169 { _extra_conflicts.erase (capability); }
170 
171 void Resolver::removeQueueItem( SolverQueueItem_Ptr item )
172 {
173  bool found = false;
174  for (SolverQueueItemList::const_iterator iter = _added_queue_items.begin();
175  iter != _added_queue_items.end(); iter++) {
176  if (*iter == item) {
177  _added_queue_items.remove(*iter);
178  found = true;
179  break;
180  }
181  }
182  if (!found) {
183  _removed_queue_items.push_back (item);
184  _removed_queue_items.unique ();
185  }
186 }
187 
188 void Resolver::addQueueItem( SolverQueueItem_Ptr item )
189 {
190  bool found = false;
191  for (SolverQueueItemList::const_iterator iter = _removed_queue_items.begin();
192  iter != _removed_queue_items.end(); iter++) {
193  if (*iter == item) {
194  _removed_queue_items.remove(*iter);
195  found = true;
196  break;
197  }
198  }
199  if (!found) {
200  _added_queue_items.push_back (item);
201  _added_queue_items.unique ();
202  }
203 }
204 
205 void Resolver::addWeak( const PoolItem & item )
206 { _addWeak.push_back( item ); }
207 
208 //---------------------------------------------------------------------------
209 
211 {
214  :resStatus(status)
215  { }
216 
217  bool operator()( PoolItem item ) // only transacts() items go here
218  {
219  item.status().resetTransact( resStatus );// clear any solver/establish transactions
220  return true;
221  }
222 };
223 
224 
226 {
229  :resStatus(status)
230  { }
231 
232  bool operator()( PoolItem item ) // only transacts() items go here
233  {
234  item.status().setTransact( true, resStatus );
235  return true;
236  }
237 };
238 
239 
241 {
243 
244  _DEBUG ("Resolver::verifySystem() ");
245 
246  _verifying = true;
247 
249  resfilter::ByTransact( ), // Resetting all transcations
250  functor::functorRef<bool,PoolItem>(resetting) );
251 
252  return resolvePool();
253 }
254 
255 
256 //----------------------------------------------------------------------------
257 // undo
258 
260 {
262  MIL << "*** undo ***" << endl;
264  resfilter::ByTransact( ), // collect transacts from Pool to resolver queue
265  functor::functorRef<bool,PoolItem>(info) );
266  // Regard dependencies of the item weak onl
267  _addWeak.clear();
268 
269  // Additional QueueItems which has to be regarded by the solver
270  _removed_queue_items.clear();
271  _added_queue_items.clear();
272 
273  return;
274 }
275 
277 {
278  // Solving with libsolv
279  static bool poolDumped = false;
280  MIL << "-------------- Calling SAT Solver -------------------" << endl;
281  if ( getenv("ZYPP_FULLLOG") ) {
282  Testcase testcase("/var/log/YaST2/autoTestcase");
283  if (!poolDumped) {
284  testcase.createTestcase (*this, true, false); // dump pool
285  poolDumped = true;
286  } else {
287  testcase.createTestcase (*this, false, false); // write control file only
288  }
289  }
290 
298  _satResolver->setUpdatesystem (false);
303 
305  if (_upgradeMode) {
306  // may overwrite some settings
308  }
309 
310  // Resetting additional solver information
311  _isInstalledBy.clear();
312  _installs.clear();
313  _satifiedByInstalled.clear();
314  _installedSatisfied.clear();
315 }
316 
318 {
319  solverInit();
321 }
322 
324 {
325  solverInit();
326 
327  // add/remove additional SolverQueueItems
328  for (SolverQueueItemList::const_iterator iter = _removed_queue_items.begin();
329  iter != _removed_queue_items.end(); iter++) {
330  for (SolverQueueItemList::const_iterator iterQueue = queue.begin(); iterQueue != queue.end(); iterQueue++) {
331  if ( (*iterQueue)->cmp(*iter) == 0) {
332  MIL << "remove from queue" << *iter;
333  queue.remove(*iterQueue);
334  break;
335  }
336  }
337  }
338 
339  for (SolverQueueItemList::const_iterator iter = _added_queue_items.begin();
340  iter != _added_queue_items.end(); iter++) {
341  bool found = false;
342  for (SolverQueueItemList::const_iterator iterQueue = queue.begin(); iterQueue != queue.end(); iterQueue++) {
343  if ( (*iterQueue)->cmp(*iter) == 0) {
344  found = true;
345  break;
346  }
347  }
348  if (!found) {
349  MIL << "add to queue" << *iter;
350  queue.push_back(*iter);
351  }
352  }
353 
354  // The application has to take care to write these solutions back to e.g. selectables in order
355  // give the user a chance for changing these decisions again.
356  _removed_queue_items.clear();
357  _added_queue_items.clear();
358 
359  return _satResolver->resolveQueue(queue, _addWeak);
360 }
361 
363 {
365 }
366 
367 
368 //----------------------------------------------------------------------------
369 // Getting more information about the solve results
370 
372 {
373  MIL << "Resolver::problems()" << endl;
374  return _satResolver->problems();
375 }
376 
378 {
379  for_( iter, solutions.begin(), solutions.end() )
380  {
381  ProblemSolution_Ptr solution = *iter;
382  if ( !solution->apply( *this ) )
383  break;
384  }
385 }
386 
388 {
389  if ( _satResolver
390  && _isInstalledBy.empty()
391  && _installs.empty()) {
392 
393  // generating new
394  PoolItemList itemsToInstall = _satResolver->resultItemsToInstall();
395 
396  for (PoolItemList::const_iterator instIter = itemsToInstall.begin();
397  instIter != itemsToInstall.end(); instIter++) {
398  // Requires
399  for (Capabilities::const_iterator capIt = (*instIter)->dep (Dep::REQUIRES).begin(); capIt != (*instIter)->dep (Dep::REQUIRES).end(); ++capIt)
400  {
401  sat::WhatProvides possibleProviders(*capIt);
402  for_( iter, possibleProviders.begin(), possibleProviders.end() ) {
403  PoolItem provider = ResPool::instance().find( *iter );
404 
405  // searching if this provider will already be installed
406  bool found = false;
407  bool alreadySetForInstallation = false;
408  ItemCapKindMap::const_iterator pos = _isInstalledBy.find(provider);
409  while (pos != _isInstalledBy.end()
410  && pos->first == provider
411  && !found) {
412  alreadySetForInstallation = true;
413  ItemCapKind capKind = pos->second;
414  if (capKind.item == *instIter) found = true;
415  pos++;
416  }
417 
418  if (!found
419  && provider.status().isToBeInstalled()) {
420  if (provider.status().isBySolver()) {
421  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::REQUIRES, !alreadySetForInstallation );
422  _isInstalledBy.insert (make_pair( provider, capKindisInstalledBy));
423  } else {
424  // no initial installation cause it has been set be e.g. user
425  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::REQUIRES, false );
426  _isInstalledBy.insert (make_pair( provider, capKindisInstalledBy));
427  }
428  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::REQUIRES, !alreadySetForInstallation );
429  _installs.insert (make_pair( *instIter, capKindisInstalledBy));
430  }
431 
432  if (provider.status().staysInstalled()) { // Is already satisfied by an item which is installed
433  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::REQUIRES, false );
434  _satifiedByInstalled.insert (make_pair( *instIter, capKindisInstalledBy));
435 
436  ItemCapKind installedSatisfied( *instIter, *capIt, Dep::REQUIRES, false );
437  _installedSatisfied.insert (make_pair( provider, installedSatisfied));
438  }
439  }
440  }
441 
442  if (!(_satResolver->onlyRequires())) {
443  //Recommends
444  for (Capabilities::const_iterator capIt = (*instIter)->dep (Dep::RECOMMENDS).begin(); capIt != (*instIter)->dep (Dep::RECOMMENDS).end(); ++capIt)
445  {
446  sat::WhatProvides possibleProviders(*capIt);
447  for_( iter, possibleProviders.begin(), possibleProviders.end() ) {
448  PoolItem provider = ResPool::instance().find( *iter );
449 
450  // searching if this provider will already be installed
451  bool found = false;
452  bool alreadySetForInstallation = false;
453  ItemCapKindMap::const_iterator pos = _isInstalledBy.find(provider);
454  while (pos != _isInstalledBy.end()
455  && pos->first == provider
456  && !found) {
457  alreadySetForInstallation = true;
458  ItemCapKind capKind = pos->second;
459  if (capKind.item == *instIter) found = true;
460  pos++;
461  }
462 
463  if (!found
464  && provider.status().isToBeInstalled()) {
465  if (provider.status().isBySolver()) {
466  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
467  _isInstalledBy.insert (make_pair( provider, capKindisInstalledBy));
468  } else {
469  // no initial installation cause it has been set be e.g. user
470  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::RECOMMENDS, false );
471  _isInstalledBy.insert (make_pair( provider, capKindisInstalledBy));
472  }
473  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::RECOMMENDS, !alreadySetForInstallation );
474  _installs.insert (make_pair( *instIter, capKindisInstalledBy));
475  }
476 
477  if (provider.status().staysInstalled()) { // Is already satisfied by an item which is installed
478  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::RECOMMENDS, false );
479  _satifiedByInstalled.insert (make_pair( *instIter, capKindisInstalledBy));
480 
481  ItemCapKind installedSatisfied( *instIter, *capIt, Dep::RECOMMENDS, false );
482  _installedSatisfied.insert (make_pair( provider, installedSatisfied));
483  }
484  }
485  }
486 
487  //Supplements
488  for (Capabilities::const_iterator capIt = (*instIter)->dep (Dep::SUPPLEMENTS).begin(); capIt != (*instIter)->dep (Dep::SUPPLEMENTS).end(); ++capIt)
489  {
490  sat::WhatProvides possibleProviders(*capIt);
491  for_( iter, possibleProviders.begin(), possibleProviders.end() ) {
492  PoolItem provider = ResPool::instance().find( *iter );
493  // searching if this item will already be installed
494  bool found = false;
495  bool alreadySetForInstallation = false;
496  ItemCapKindMap::const_iterator pos = _isInstalledBy.find(*instIter);
497  while (pos != _isInstalledBy.end()
498  && pos->first == *instIter
499  && !found) {
500  alreadySetForInstallation = true;
501  ItemCapKind capKind = pos->second;
502  if (capKind.item == provider) found = true;
503  pos++;
504  }
505 
506  if (!found
507  && instIter->status().isToBeInstalled()) {
508  if (instIter->status().isBySolver()) {
509  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
510  _isInstalledBy.insert (make_pair( *instIter, capKindisInstalledBy));
511  } else {
512  // no initial installation cause it has been set be e.g. user
513  ItemCapKind capKindisInstalledBy( provider, *capIt, Dep::SUPPLEMENTS, false );
514  _isInstalledBy.insert (make_pair( *instIter, capKindisInstalledBy));
515  }
516  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
517  _installs.insert (make_pair( provider, capKindisInstalledBy));
518  }
519 
520  if (instIter->status().staysInstalled()) { // Is already satisfied by an item which is installed
521  ItemCapKind capKindisInstalledBy( *instIter, *capIt, Dep::SUPPLEMENTS, !alreadySetForInstallation );
522  _satifiedByInstalled.insert (make_pair( provider, capKindisInstalledBy));
523 
524  ItemCapKind installedSatisfied( provider, *capIt, Dep::SUPPLEMENTS, false );
525  _installedSatisfied.insert (make_pair( *instIter, installedSatisfied));
526  }
527  }
528  }
529  }
530  }
531  }
532 }
533 
534 
536 {
537  ItemCapKindList ret;
539 
540  for (ItemCapKindMap::const_iterator iter = _isInstalledBy.find(item); iter != _isInstalledBy.end();) {
541  ItemCapKind info = iter->second;
542  PoolItem iterItem = iter->first;
543  if (iterItem == item) {
544  ret.push_back(info);
545  iter++;
546  } else {
547  // exit
548  iter = _isInstalledBy.end();
549  }
550  }
551  return ret;
552 }
553 
555 {
556  ItemCapKindList ret;
558 
559  for (ItemCapKindMap::const_iterator iter = _installs.find(item); iter != _installs.end();) {
560  ItemCapKind info = iter->second;
561  PoolItem iterItem = iter->first;
562  if (iterItem == item) {
563  ret.push_back(info);
564  iter++;
565  } else {
566  // exit
567  iter = _installs.end();
568  }
569  }
570  return ret;
571 }
572 
574 {
575  ItemCapKindList ret;
577 
578  for (ItemCapKindMap::const_iterator iter = _satifiedByInstalled.find(item); iter != _satifiedByInstalled.end();) {
579  ItemCapKind info = iter->second;
580  PoolItem iterItem = iter->first;
581  if (iterItem == item) {
582  ret.push_back(info);
583  iter++;
584  } else {
585  // exit
586  iter = _satifiedByInstalled.end();
587  }
588  }
589  return ret;
590 }
591 
593 {
594  ItemCapKindList ret;
596 
597  for (ItemCapKindMap::const_iterator iter = _installedSatisfied.find(item); iter != _installedSatisfied.end();) {
598  ItemCapKind info = iter->second;
599  PoolItem iterItem = iter->first;
600  if (iterItem == item) {
601  ret.push_back(info);
602  iter++;
603  } else {
604  // exit
605  iter = _installedSatisfied.end();
606  }
607  }
608  return ret;
609 }
610 
611 
613  };// namespace detail
616  };// namespace solver
619 };// namespace zypp
621 
::_Pool * get() const
Expert backdoor.
Definition: Pool.cc:36
void removeExtraConflict(const Capability &capability)
Definition: Resolver.cc:168
ItemCapKindMap _isInstalledBy
Definition: Resolver.h:139
Interface to gettext.
std::list< ProblemSolution_Ptr > ProblemSolutionList
Definition: ProblemTypes.h:42
#define MIL
Definition: Logger.h:47
void setSolveSrcPackages(bool state_r)
Definition: SATResolver.h:208
bool operator()(PoolItem item)
Definition: Resolver.cc:232
const_iterator begin() const
Definition: ResPool.h:85
void setCleandepsOnRemove(bool state_r)
Definition: SATResolver.h:211
Container of Solvable providing a Capability (read only).
Definition: WhatProvides.h:87
static const Dep RECOMMENDS
Definition: Dep.h:47
static const Dep SUPPLEMENTS
Definition: Dep.h:50
void addExtraRequire(const Capability &capability)
Definition: Resolver.cc:159
ItemCapKindList isInstalledBy(const PoolItem &item)
Definition: Resolver.cc:535
bool ignoreAlreadyRecommended() const
Definition: Resolver.h:199
void removeQueueItem(SolverQueueItem_Ptr item)
Definition: Resolver.cc:171
void addQueueItem(SolverQueueItem_Ptr item)
Definition: Resolver.cc:188
ResolverProblemList problems() const
Definition: Resolver.cc:371
static ZConfig & instance()
Singleton ctor.
Definition: ZConfig.cc:655
PoolItemList problematicUpdateItems(void) const
Definition: SATResolver.h:213
#define OUTS(t)
bool resolveQueue(SolverQueueItemList &queue)
Definition: Resolver.cc:323
void setAllowarchchange(const bool allowarchchange)
Definition: SATResolver.h:187
bool solveSrcPackages() const
Definition: Resolver.h:219
void addExtraConflict(const Capability &capability)
Definition: Resolver.cc:165
void setAllowVendorChange(TriBool state_r)
Definition: Resolver.cc:108
UndoTransact(const ResStatus::TransactByValue &status)
Definition: Resolver.cc:213
CapabilitySet _extra_conflicts
Definition: Resolver.h:109
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.
Definition: Algorithm.h:30
std::list< PoolItem > PoolItemList
Definition: Types.h:51
Libsolv transaction wrapper.
Definition: Transaction.h:54
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition: Easy.h:27
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
Definition: ResStatus.h:473
bool solver_cleandepsOnRemove() const
Whether removing a package should also remove no longer needed requirements.
Definition: ZConfig.cc:875
Generating a testcase of the current pool and solver state.
Definition: Testcase.h:35
const_iterator end() const
Definition: ResPool.h:88
std::list< SolverQueueItem_Ptr > SolverQueueItemList
void reset(bool keepExtras=false)
Definition: Resolver.cc:128
void setUpdatesystem(const bool updatesystem)
Definition: SATResolver.h:196
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
Definition: TriBool.h:39
void setOnlyRequires(const bool onlyRequires)
Definition: SATResolver.h:205
std::list< ResolverProblem_Ptr > ResolverProblemList
Definition: ProblemTypes.h:46
static Pool instance()
Singleton ctor.
Definition: Pool.h:51
solver::detail::SolverQueueItemList _removed_queue_items
Definition: Resolver.h:135
const_iterator begin() const
Iterator pointing to the first Solvable.
void setAllowdowngrade(const bool allowdowngrade)
Definition: SATResolver.h:184
void setCleandepsOnRemove(TriBool state_r)
Definition: Resolver.cc:118
const_iterator end() const
Iterator pointing behind the last Solvable.
Definition: WhatProvides.h:226
solver::detail::SolverQueueItemList _added_queue_items
Definition: Resolver.h:136
sat::Transaction getTransaction()
Definition: Resolver.cc:362
ResStatus::TransactByValue resStatus
Definition: Resolver.cc:212
void setNoupdateprovide(const bool noupdateprovide)
Definition: SATResolver.h:199
std::unary_function< PoolItem, bool > PoolItemFilterFunctor
Definition: ResFilters.h:284
void addWeak(const PoolItem &item)
Definition: Resolver.cc:205
Interim helper class to collect global options and settings.
Definition: ZConfig.h:58
void removeExtraRequire(const Capability &capability)
Definition: Resolver.cc:162
void setAllowvendorchange(const bool allowvendorchange)
Definition: SATResolver.h:190
void setDistupgrade_removeunsupported(const bool distupgrade_removeunsupported)
Definition: SATResolver.h:181
virtual std::ostream & dumpOn(std::ostream &str) const
Overload to realize std::ostream &amp; operator&lt;&lt;.
Definition: Resolver.cc:61
static const Dep REQUIRES
Definition: Dep.h:44
void setIgnorealreadyrecommended(const bool ignorealreadyrecommended)
Definition: SATResolver.h:175
ResStatus & status() const
Returns the current status.
Definition: PoolItem.cc:241
void setOnlyRequires(TriBool state_r)
Definition: Resolver.cc:113
bool allowVendorChange() const
Definition: Resolver.h:216
bool cleandepsOnRemove() const
Definition: Resolver.h:222
void applySolutions(const ProblemSolutionList &solutions)
Definition: Resolver.cc:377
bool operator()(PoolItem item)
Definition: Resolver.cc:217
Select PoolItem by transact.
Definition: ResFilters.h:306
void setDosplitprovides(const bool dosplitprovides)
Definition: SATResolver.h:202
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:421
bool isVerifyingMode() const
Definition: Resolver.h:213
ItemCapKindMap _satifiedByInstalled
Definition: Resolver.h:141
bool solver_allowVendorChange() const
Whether vendor check is by default enabled.
Definition: ZConfig.cc:872
bool solver_onlyRequires() const
Solver regards required packages,patterns,...
Definition: ZConfig.cc:869
bool resolveQueue(const SolverQueueItemList &requestQueue, const PoolItemList &weakItems)
Definition: SATResolver.cc:789
Global ResObject pool.
Definition: ResPool.h:48
static constexpr LoadFromPoolType loadFromPool
Definition: Transaction.h:85
std::list< ItemCapKind > ItemCapKindList
Definition: Resolver.h:88
CapabilitySet _extra_requires
Definition: Resolver.h:108
ResStatus::TransactByValue resStatus
Definition: Resolver.cc:227
ItemCapKindList installs(const PoolItem &item)
Definition: Resolver.cc:554
bool createTestcase(Resolver &resolver, bool dumpPool=true, bool runSolver=true)
Definition: Testcase.cc:475
bool isToBeInstalled() const
Definition: ResStatus.h:241
ItemCapKindMap _installedSatisfied
Definition: Resolver.h:142
A sat capability.
Definition: Capability.h:59
Capabilities iterator.
Definition: Capabilities.h:91
void setDistupgrade(const bool distupgrade)
Definition: SATResolver.h:178
bool resolvePool(const CapabilitySet &requires_caps, const CapabilitySet &conflict_caps, const PoolItemList &weakItems, const std::set< Repository > &upgradeRepos)
Definition: SATResolver.cc:723
IMPL_PTR_TYPE(ProblemSolutionCombi)
#define _DEBUG(x)
Definition: Types.h:37
Global sat-pool.
Definition: Pool.h:42
std::set< Repository > _upgradeRepos
Definition: Resolver.h:110
DoTransact(const ResStatus::TransactByValue &status)
Definition: Resolver.cc:228
Reference to a PoolItem connecting ResObject and ResStatus.
Definition: PoolItem.h:50
PoolItemList problematicUpdateItems() const
Definition: Resolver.cc:156
ItemCapKindList satifiedByInstalled(const PoolItem &item)
Definition: Resolver.cc:573
PoolItem find(const sat::Solvable &slv_r) const
Return the corresponding PoolItem.
Definition: ResPool.cc:70
ItemCapKindList installedSatisfied(const PoolItem &item)
Definition: Resolver.cc:592
bool isBySolver() const
Definition: ResStatus.h:278
void setAllowuninstall(const bool allowuninstall)
Definition: SATResolver.h:193
ResolverProblemList problems()
Resolver(const ResPool &pool)
Definition: Resolver.cc:81
bool staysInstalled() const
Definition: ResStatus.h:236
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:33
void setFixsystem(const bool fixsystem)
Definition: SATResolver.h:172