30 #ifndef PKGLIB_ALGORITHMS_H
31 #define PKGLIB_ALGORITHMS_H
34 #include <apt-pkg/packagemanager.h>
35 #include <apt-pkg/depcache.h>
39 #ifndef APT_8_CLEANER_HEADERS
57 return (*Cache)[Pkg].CandidateVerIter(*Cache);
70 virtual bool Install(
PkgIterator Pkg,std::string File);
76 void Describe(
PkgIterator iPkg,std::ostream &out,
bool Current,
bool Candidate);
97 enum Flags {Protected = (1 << 0), PreInstalled = (1 << 1),
98 Upgradable = (1 << 2), ReInstateTried = (1 << 3),
101 unsigned char *Flags;
106 static int ScoreSort(
const void *a,
const void *b);
117 bool ResolveInternal(
bool const BrokenFix =
false);
118 bool ResolveByKeepInternal();
125 inline void Protect(
pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected; Cache.MarkProtected(Pkg);};
130 bool Resolve(
bool BrokenFix =
false);
133 bool ResolveByKeep();
136 void InstallProtect();
151 bool AcquireUpdate(
pkgAcquire &Fetcher,
int const PulseInterval = 0,
152 bool const RunUpdateScripts =
true,
bool const ListCleanup =
true);