summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.h
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
committerMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
commit443f5e8a3205162ec6933529c5ca0c95ad3f6941 (patch)
tree3e2da22dcecc8eeaabc1ac5ceac0407a8e3cc25f /apt-pkg/orderlist.h
parent96273866174c54bdb25813633891f29668d43848 (diff)
parentf352743312edeebf666e1c8304cdc4baf457469f (diff)
merge from the expermental2 branch
Diffstat (limited to 'apt-pkg/orderlist.h')
-rw-r--r--apt-pkg/orderlist.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index 264f7ba03..a2d7b321b 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -38,7 +38,7 @@ class pkgOrderList : protected pkgCache::Namespace
Package **End;
Package **List;
Package **AfterEnd;
- string *FileList;
+ std::string *FileList;
DepIterator Loops[20];
int LoopCount;
int Depth;
@@ -76,7 +76,12 @@ class pkgOrderList : protected pkgCache::Namespace
typedef Package **iterator;
- // State flags
+ /* State flags
+ The Loop flag can be set on a package that is currently being processed by either SmartConfigure or
+ SmartUnPack. This allows the package manager to tell when a loop has been formed as it will try to
+ SmartUnPack or SmartConfigure a package with the Loop flag set. It will then either stop (as it knows
+ that the operation is unnecessary as its already in process), or in the case of the conflicts resolution
+ in SmartUnPack, use EarlyRemove to resolve the situation. */
enum Flags {Added = (1 << 0), AddPending = (1 << 1),
Immediate = (1 << 2), Loop = (1 << 3),
UnPacked = (1 << 4), Configured = (1 << 5),
@@ -91,10 +96,13 @@ class pkgOrderList : protected pkgCache::Namespace
void Flag(PkgIterator Pkg,unsigned long State, unsigned long F) {Flags[Pkg->ID] = (Flags[Pkg->ID] & (~F)) | State;};
inline void Flag(PkgIterator Pkg,unsigned long F) {Flags[Pkg->ID] |= F;};
inline void Flag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] |= F;};
+ // RmFlag removes a flag from a package
+ inline void RmFlag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] &= ~F;};
+ // IsNow will return true if the Pkg has been not been either configured or unpacked
inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;};
bool IsMissing(PkgIterator Pkg);
void WipeFlags(unsigned long F);
- void SetFileList(string *FileList) {this->FileList = FileList;};
+ void SetFileList(std::string *FileList) {this->FileList = FileList;};
// Accessors
inline iterator begin() {return List;};
@@ -107,7 +115,7 @@ class pkgOrderList : protected pkgCache::Namespace
// Ordering modes
bool OrderCritical();
- bool OrderUnpack(string *FileList = 0);
+ bool OrderUnpack(std::string *FileList = 0);
bool OrderConfigure();
int Score(PkgIterator Pkg);