apt @VERSION@
|
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), Protected = (1 << 3) } |
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 | MarkProtected (PkgIterator const &Pkg) |
void | SetReInstall (PkgIterator const &Pkg, bool To) |
void | SetCandidateVersion (VerIterator TargetVer, bool const &Pseudo=true) |
bool | SetCandidateRelease (pkgCache::VerIterator TargetVer, std::string const &TargetRel) |
bool | SetCandidateRelease (pkgCache::VerIterator TargetVer, std::string const &TargetRel, std::list< std::pair< pkgCache::VerIterator, pkgCache::VerIterator > > &Changed) |
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. |
References MarkAndSweep().
Referenced by MarkAndSweep().
void MarkAuto | ( | const PkgIterator & | Pkg, |
bool | Auto | ||
) |
Set the "is automatically installed" flag of Pkg.
bool MarkFollowsRecommends | ( | ) | [virtual] |
bool MarkFollowsSuggests | ( | ) | [virtual] |
bool SetCandidateRelease | ( | pkgCache::VerIterator | TargetVer, |
std::string const & | TargetRel, | ||
std::list< std::pair< pkgCache::VerIterator, pkgCache::VerIterator > > & | Changed | ||
) |
Set the candidate version for dependencies too if needed.
Sets not only the candidate version as SetCandidateVersion does, but walks also down the dependency tree and checks if it is required to set the candidate of the dependency to a version from the given release, too.
TargetVer | new candidate version of the package | |
TargetRel | try to switch to this release if needed | |
[out] | Changed | a list of pairs consisting of the old version of the changed package and the version which required the switch of this dependency |
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