~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to zypp/solver/detail/SATResolver.h

  • Committer: Thomas-Karl Pietrowski
  • Date: 2015-08-15 15:59:50 UTC
  • Revision ID: thopiekar@googlemail.com-20150815155950-j66qn38efmvn289t
syncing with "changes 15.13.0 (11)"  #9a0aca7e3a21d768491b141a8ae86ef0c3fbc227
* https://github.com/openSUSE/libzypp/commit/9a0aca7e3a21d768491b141a8ae86ef0c3fbc227

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#ifndef ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H
23
23
#define ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H
24
 
 
 
24
#ifndef ZYPP_USE_RESOLVER_INTERNALS
 
25
#error Do not directly include this file!
 
26
#else
25
27
extern "C"
26
28
{
27
29
#include <solv/solver.h>
43
45
#include "zypp/Capability.h"
44
46
#include "zypp/solver/detail/SolverQueueItem.h"
45
47
 
 
48
#include "zypp/sat/detail/PoolMember.h"
 
49
 
46
50
/////////////////////////////////////////////////////////////////////////
47
51
namespace zypp
48
52
{ ///////////////////////////////////////////////////////////////////////
68
72
 * via solver::detail::Resolver to SATResolver is pedestrian and error prone.
69
73
 * Introdce a dedicated solver option structure which is passed down as a whole.
70
74
*/
71
 
class SATResolver : public base::ReferenceCounted, private base::NonCopyable {
 
75
class SATResolver : public base::ReferenceCounted, private base::NonCopyable, private sat::detail::PoolMember
 
76
{
72
77
 
73
78
  private:
74
79
    ResPool _pool;
88
93
    // solve results
89
94
    PoolItemList _result_items_to_install;
90
95
    PoolItemList _result_items_to_remove;
91
 
 
92
 
    bool _fixsystem;                    // repair errors in rpm dependency graph
93
 
    bool _allowdowngrade;               // allow to downgrade installed solvable
94
 
    bool _allowarchchange;              // allow to change architecture of installed solvables
95
 
    bool _allowvendorchange;            // allow to change vendor of installed solvables
96
 
    bool _allowuninstall;               // allow removal of installed solvables
97
 
    bool _updatesystem;                 // update
98
 
    bool _noupdateprovide;              // true: update packages needs not to provide old package
99
 
    bool _dosplitprovides;              // true: consider legacy split provides
100
 
    bool _onlyRequires;                 // true: consider required packages only
101
 
    bool _ignorealreadyrecommended;     // true: ignore recommended packages that were already recommended by the installed packages
102
 
    bool _distupgrade;
103
 
    bool _distupgrade_removeunsupported;
104
 
    bool _solveSrcPackages;             // false: generate no job rule for source packages selected in the pool
105
 
    bool _cleandepsOnRemove;            // whether removing a package should also remove no longer needed requirements
106
 
 
 
96
  public:
 
97
    bool _fixsystem:1;                  // repair errors in rpm dependency graph
 
98
    bool _allowdowngrade:1;             // allow to downgrade installed solvable
 
99
    bool _allowarchchange:1;            // allow to change architecture of installed solvables
 
100
    bool _allowvendorchange:1;          // allow to change vendor of installed solvables
 
101
    bool _allowuninstall:1;             // allow removal of installed solvables
 
102
    bool _updatesystem:1;               // update
 
103
    bool _noupdateprovide:1;            // true: update packages needs not to provide old package
 
104
    bool _dosplitprovides:1;            // true: consider legacy split provides
 
105
    bool _onlyRequires:1;               // true: consider required packages only
 
106
    bool _ignorealreadyrecommended:1;   // true: ignore recommended packages that were already recommended by the installed packages
 
107
    bool _distupgrade:1;
 
108
    bool _distupgrade_removeunsupported:1;
 
109
    bool _dup_allowdowngrade:1;         // dup mode: allow to downgrade installed solvable
 
110
    bool _dup_allownamechange:1;        // dup mode: allow to change name of installed solvable
 
111
    bool _dup_allowarchchange:1;        // dup mode: allow to change architecture of installed solvables
 
112
    bool _dup_allowvendorchange:1;      // dup mode: allow to change vendor of installed solvables
 
113
    bool _solveSrcPackages:1;           // false: generate no job rule for source packages selected in the pool
 
114
    bool _cleandepsOnRemove:1;          // whether removing a package should also remove no longer needed requirements
 
115
 
 
116
  private:
107
117
    // ---------------------------------- methods
108
118
    std::string SATprobleminfoString (Id problem, std::string &detail, Id &ignoreId);
109
119
    void resetItemTransaction (PoolItem item);
229
239
  ///////////////////////////////////////////////////////////////////////
230
240
};// namespace zypp
231
241
/////////////////////////////////////////////////////////////////////////
232
 
 
 
242
#endif // ZYPP_USE_RESOLVER_INTERNALS
233
243
#endif // ZYPP_SOLVER_DETAIL_SAT_RESOLVER_H