blob: 17a01995e70224efe8c5e9f6b40a15b01bb97ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
class ZYppCommitPolicy
{
public:
ZYppCommitPolicy()
: _restrictToMedia ( 0 )
, _dryRun ( false )
, _rpmNoSignature ( false )
, _syncPoolAfterCommit( true )
{}
public:
unsigned restrictToMedia() const
{ return _restrictToMedia; }
bool dryRun() const
{ return _dryRun; }
bool rpmNoSignature() const
{ return _rpmNoSignature; }
bool syncPoolAfterCommit() const
{ return _syncPoolAfterCommit; }
public:
/** Restrict commit to a certain media number
* \deprecated
*/
ZYppCommitPolicy & restrictToMedia( unsigned mediaNr_r )
{ _restrictToMedia = mediaNr_r; return *this; }
/** Process all media (default) */
ZYppCommitPolicy & allMedia()
{ return restrictToMedia( 0 ); }
/** Set dry run (default: false) */
ZYppCommitPolicy & dryRun( bool yesNo_r = true )
{ _dryRun = yesNo_r; return *this; }
/** Use rpm option --nosignature (default: false) */
ZYppCommitPolicy & rpmNoSignature( bool yesNo_r = true )
{ _rpmNoSignature = yesNo_r; return *this; }
/** Kepp pool in sync with the Target databases after commit (default: true) */
ZYppCommitPolicy & syncPoolAfterCommit( bool yesNo_r = true )
{ _syncPoolAfterCommit = yesNo_r; return *this; }
private:
unsigned _restrictToMedia;
bool _dryRun;
bool _rpmNoSignature;
bool _syncPoolAfterCommit;
};
|