diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-09-14 20:22:31 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-09-14 20:22:31 +0200 |
commit | 75a90b93257ea81d42331c03b56bd6589c62e065 (patch) | |
tree | 0b5c7deb860eed58c40c472bb62c6fa00e281af6 /apt-pkg/orderlist.h | |
parent | c194970f5a852ff6c5e23804be818cedd75e9651 (diff) | |
parent | b57257d2993aaf8c0cf9d6f0ea8ebd0208112bc5 (diff) |
enable APT in unpack/configure ordering to handle loops as well
as tight dependencies between immediate packages better
enabling also the possibility to mark all packages as immediate
(at least Closes: #353290, #540227, #559733, #621836, #639290)
Diffstat (limited to 'apt-pkg/orderlist.h')
-rw-r--r-- | apt-pkg/orderlist.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index 264f7ba03..9588d30a5 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -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,6 +96,9 @@ 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); |