libzypp
17.14.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Resolver.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_RESOLVER_H
13
#define ZYPP_RESOLVER_H
14
15
#include <iosfwd>
16
#include <functional>
17
18
#include "
zypp/base/ReferenceCounted.h
"
19
#include "
zypp/base/PtrTypes.h
"
20
21
#include "
zypp/ResPool.h
"
22
#include "
zypp/PoolItem.h
"
23
#include "
zypp/Capabilities.h
"
24
#include "
zypp/Capability.h
"
25
#include "
zypp/ResolverNamespace.h
"
26
27
#include "
zypp/solver/detail/Types.h
"
28
29
#include "
zypp/ProblemTypes.h
"
30
#include "
zypp/ResolverProblem.h
"
31
#include "
zypp/ProblemSolution.h
"
32
34
namespace
zypp
35
{
36
37
namespace
sat
38
{
39
class
Transaction;
40
}
41
43
//
44
// CLASS NAME : Resolver
45
//
54
class
Resolver
:
public
base::ReferenceCounted
,
private
base::NonCopyable
55
{
56
public
:
57
59
Resolver
(
const
ResPool
& pool );
61
virtual
~Resolver
();
62
71
bool
verifySystem
();
72
73
88
bool
resolvePool
();
89
90
108
bool
resolveQueue
(
solver::detail::SolverQueueItemList
& queue );
109
110
/*
111
* Undo solver changes done in resolvePool()
112
* Throwing away all ignored dependencies.
113
*/
114
void
undo
();
115
116
/*
117
* Resets solver information and verify option.
118
*/
119
void
reset
();
120
121
135
bool
doUpgrade
();
136
146
void
doUpdate
( );
147
155
std::list<PoolItem>
problematicUpdateItems
()
const
;
156
162
ResolverProblemList
problems
();
163
164
169
void
applySolutions
(
const
ProblemSolutionList
& solutions );
170
174
sat::Transaction
getTransaction
();
175
181
void
setForceResolve
(
bool
force );
182
bool
forceResolve
()
const
;
183
188
void
setIgnoreAlreadyRecommended
(
bool
yesno_r );
189
bool
ignoreAlreadyRecommended
()
const
;
190
196
void
setOnlyRequires
(
bool
yesno_r );
197
void
resetOnlyRequires
();
// set back to default (described in zypp.conf)
198
bool
onlyRequires
()
const
;
199
205
void
setUpgradeMode
(
bool
yesno_r );
206
bool
upgradeMode
()
const
;
207
213
void
setUpdateMode
(
bool
yesno_r );
214
bool
updateMode
()
const
;
215
216
222
void
setAllowDowngrade
(
bool
yesno_r );
223
void
setDefaultAllowDowngrade
();
// Set back to default
224
bool
allowDowngrade
()
const
;
225
227
void
setAllowNameChange
(
bool
yesno_r );
228
void
setDefaultAllowNameChange
();
// Set back to default
229
bool
allowNameChange
()
const
;
230
232
void
setAllowArchChange
(
bool
yesno_r );
233
void
setDefaultAllowArchChange
();
// Set back to default
234
bool
allowArchChange
()
const
;
235
239
void
setAllowVendorChange
(
bool
yesno_r );
240
void
setDefaultAllowVendorChange
();
// Set back to default
241
bool
allowVendorChange
()
const
;
243
249
void
setSystemVerification
(
bool
yesno_r );
250
void
setDefaultSystemVerification
();
251
bool
systemVerification
()
const
;
252
262
void
setSolveSrcPackages
(
bool
yesno_r );
263
void
setDefaultSolveSrcPackages
();
264
bool
solveSrcPackages
()
const
;
265
270
void
setCleandepsOnRemove
(
bool
yesno_r );
271
void
setDefaultCleandepsOnRemove
();
// set back to default (in zypp.conf)
272
bool
cleandepsOnRemove
()
const
;
273
280
void
dupSetAllowDowngrade
(
bool
yesno_r );
281
void
dupSetDefaultAllowDowngrade
();
// Set back to default (in zypp.conf)
282
bool
dupAllowDowngrade
()
const
;
283
285
void
dupSetAllowNameChange
(
bool
yesno_r );
286
void
dupSetDefaultAllowNameChange
();
// Set back to default (in zypp.conf)
287
bool
dupAllowNameChange
()
const
;
288
290
void
dupSetAllowArchChange
(
bool
yesno_r );
291
void
dupSetDefaultAllowArchChange
();
// Set back to default (in zypp.conf)
292
bool
dupAllowArchChange
()
const
;
293
295
void
dupSetAllowVendorChange
(
bool
yesno_r );
296
void
dupSetDefaultAllowVendorChange
();
// Set back to default (in zypp.conf)
297
bool
dupAllowVendorChange
()
const
;
299
311
void
addUpgradeRepo
(
Repository
repo_r );
312
316
bool
upgradingRepos
()
const
;
317
321
bool
upgradingRepo
(
Repository
repo_r )
const
;
322
326
void
removeUpgradeRepo
(
Repository
repo_r );
327
331
void
removeUpgradeRepos
();
333
338
void
addRequire
(
const
Capability
& capability );
339
344
void
addConflict
(
const
Capability
& capability );
345
350
void
removeRequire
(
const
Capability
& capability );
351
356
void
removeConflict
(
const
Capability
& capability );
357
362
CapabilitySet
getRequire
()
const
;
363
368
CapabilitySet
getConflict
()
const
;
369
376
bool
createSolverTestcase
(
const
std::string & dumpPath =
"/var/log/YaST2/solverTestcase"
,
bool
runSolver =
true
);
377
392
solver::detail::ItemCapKindList
isInstalledBy
(
const
PoolItem
& item );
393
408
solver::detail::ItemCapKindList
installs
(
const
PoolItem
& item );
409
424
solver::detail::ItemCapKindList
satifiedByInstalled
(
const
PoolItem
& item );
425
426
441
solver::detail::ItemCapKindList
installedSatisfied
(
const
PoolItem
& item );
442
443
444
private
:
445
friend
std::ostream &
operator<<
( std::ostream & str,
const
Resolver
& obj );
446
zypp::RW_pointer<solver::detail::ResolverInternal>
_pimpl
;
447
};
449
451
std::ostream &
operator<<
( std::ostream & str,
const
Resolver
& obj );
452
454
}
// namespace zypp
456
#endif // ZYPP_RESOLVER_H
zypp
Resolver.h
Generated by
1.8.2