Classes | |
class | ActionGroup |
Represents an active action group. More... | |
class | DefaultRootSetFunc |
Returns true for packages matching a regular expression in APT::NeverAutoRemove. More... | |
class | InRootSetFunc |
An arbitrary predicate on packages. More... | |
class | Policy |
struct | StateCache |
Public Types | |
enum | DepFlags { DepNow = (1 << 0), DepInstall = (1 << 1), DepCVer = (1 << 2), DepGNow = (1 << 3), DepGInstall = (1 << 4), DepGCVer = (1 << 5) } |
enum | DepStateFlags { DepNowPolicy = (1 << 0), DepNowMin = (1 << 1), DepInstPolicy = (1 << 2), DepInstMin = (1 << 3), DepCandPolicy = (1 << 4), DepCandMin = (1 << 5) } |
enum | InternalFlags { AutoKept = (1 << 0), Purge = (1 << 1), ReInstall = (1 << 2) } |
enum | VersionTypes { NowVersion, InstallVersion, CandidateVersion } |
enum | ModeList { ModeDelete = 0, ModeKeep = 1, ModeInstall = 2 } |
Public Member Functions | |
void | BuildGroupOrs (VerIterator const &V) |
void | UpdateVerState (PkgIterator Pkg) |
operator pkgCache & () | |
Header & | Head () |
GrpIterator | GrpBegin () |
PkgIterator | PkgBegin () |
GrpIterator | FindGrp (string const &Name) |
PkgIterator | FindPkg (string const &Name) |
PkgIterator | FindPkg (string const &Name, string const &Arch) |
pkgCache & | GetCache () |
pkgVersioningSystem & | VS () |
VerIterator | GetCandidateVer (PkgIterator const &Pkg) |
bool | IsImportantDep (DepIterator Dep) |
Policy & | GetPolicy () |
StateCache & | operator[] (PkgIterator const &I) |
unsigned char & | operator[] (DepIterator const &I) |
virtual InRootSetFunc * | GetRootSetFunc () |
virtual bool | MarkFollowsRecommends () |
virtual bool | MarkFollowsSuggests () |
bool | MarkAndSweep (InRootSetFunc &rootFunc) |
Update the Marked and Garbage fields of all packages. | |
bool | MarkAndSweep () |
virtual bool | IsInstallOk (const PkgIterator &Pkg, bool AutoInst=true, unsigned long Depth=0, bool FromUser=true) |
virtual bool | IsDeleteOk (const PkgIterator &Pkg, bool Purge=false, unsigned long Depth=0, bool FromUser=true) |
bool | readStateFile (OpProgress *prog) |
bool | writeStateFile (OpProgress *prog, bool InstalledOnly=true) |
signed long long | UsrSize () |
unsigned long long | DebSize () |
unsigned long | DelCount () |
unsigned long | KeepCount () |
unsigned long | InstCount () |
unsigned long | BrokenCount () |
unsigned long | PolicyBrokenCount () |
unsigned long | BadCount () |
bool | Init (OpProgress *Prog) |
void | Update (OpProgress *Prog=0) |
pkgDepCache (pkgCache *Cache, Policy *Plcy=0) | |
State Manipulators | |
void | MarkKeep (PkgIterator const &Pkg, bool Soft=false, bool FromUser=true, unsigned long Depth=0) |
void | MarkDelete (PkgIterator const &Pkg, bool Purge=false, unsigned long Depth=0, bool FromUser=true) |
void | MarkInstall (PkgIterator const &Pkg, bool AutoInst=true, unsigned long Depth=0, bool FromUser=true, bool ForceImportantDeps=false) |
void | SetReInstall (PkgIterator const &Pkg, bool To) |
void | SetCandidateVersion (VerIterator TargetVer, bool const &Pseudo=true) |
void | MarkAuto (const PkgIterator &Pkg, bool Auto) |
Protected Member Functions | |
bool | CheckDep (DepIterator Dep, int Type, PkgIterator &Res) |
bool | CheckDep (DepIterator Dep, int Type) |
unsigned char | DependencyState (DepIterator &D) |
unsigned char | VersionState (DepIterator D, unsigned char Check, unsigned char SetMin, unsigned char SetPolicy) |
void | Update (DepIterator Dep) |
void | Update (PkgIterator const &P) |
void | AddSizes (const PkgIterator &Pkg, bool const &Invert=false) |
void | RemoveSizes (const PkgIterator &Pkg) |
void | AddSizes (const PkgIterator &Pkg, signed long Mult) __deprecated |
void | AddStates (const PkgIterator &Pkg, int Add=1) |
void | RemoveStates (const PkgIterator &Pkg) |
Protected Attributes | |
pkgCache * | Cache |
StateCache * | PkgState |
unsigned char * | DepState |
signed long long | iUsrSize |
unsigned long long | iDownloadSize |
unsigned long | iInstCount |
unsigned long | iDelCount |
unsigned long | iKeepCount |
unsigned long | iBrokenCount |
unsigned long | iPolicyBrokenCount |
unsigned long | iBadCount |
bool | DebugMarker |
bool | DebugAutoInstall |
Policy * | delLocalPolicy |
Policy * | LocalPolicy |
Friends | |
class | ActionGroup |
pkgDepCache::InRootSetFunc * GetRootSetFunc | ( | ) | [virtual] |
References Configuration::MatchAgainstConfig::wasConstructedSuccessfully().
bool IsDeleteOk | ( | const PkgIterator & | Pkg, | |
bool | Purge = false , |
|||
unsigned long | Depth = 0 , |
|||
bool | FromUser = true | |||
) | [virtual] |
See the default implementation for a simple example how this method can be used. Overriding implementations should use the hold-state-flag to cache results from previous checks of this package - also it should be used if the default resolver implementation is also used to ensure that these packages are handled like "normal" dpkg holds.
The parameters are the same as in the calling MarkDelete:
Pkg | the package that MarkDelete wants to remove. | |
Purge | should we purge instead of "only" remove? | |
Depth | recursive deep of this Marker call | |
FromUser | was the remove requested by the user? |
bool IsInstallOk | ( | const PkgIterator & | Pkg, | |
bool | AutoInst = true , |
|||
unsigned long | Depth = 0 , |
|||
bool | FromUser = true | |||
) | [virtual] |
See the default implementation for a simple example how this method can be used. Overriding implementations should use the hold-state-flag to cache results from previous checks of this package - also it should be used if the default resolver implementation is also used to ensure that these packages are handled like "normal" dpkg holds.
The parameters are the same as in the calling MarkInstall:
Pkg | the package that MarkInstall wants to install. | |
AutoInst | needs a previous MarkInstall this package? | |
Depth | recursive deep of this Marker call | |
FromUser | was the install requested by the user? |
bool MarkAndSweep | ( | InRootSetFunc & | rootFunc | ) | [inline] |
Update the Marked and Garbage fields of all packages.
This routine is implicitly invoked after all state manipulators and when an ActionGroup is destroyed. It invokes MarkRequired and Sweep to do its dirty work.
rootFunc | A predicate that returns true for packages that should be added to the root set. |
Referenced by pkgDepCache::ActionGroup::release().
void MarkAuto | ( | const PkgIterator & | Pkg, | |
bool | Auto | |||
) |
Set the "is automatically installed" flag of Pkg.
bool MarkFollowsRecommends | ( | ) | [virtual] |
bool MarkFollowsSuggests | ( | ) | [virtual] |
void MarkKeep | ( | PkgIterator const & | Pkg, | |
bool | Soft = false , |
|||
bool | FromUser = true , |
|||
unsigned long | Depth = 0 | |||
) |
References pkgDepCache::StateCache::Marked.
unsigned long long iDownloadSize [protected] |
Stores how much we need to download to get the packages
signed long long iUsrSize [protected] |
Stores the space changes after installation