30 #ifndef PKGLIB_ALGORITHMS_H
31 #define PKGLIB_ALGORITHMS_H
34 #include <apt-pkg/packagemanager.h>
35 #include <apt-pkg/depcache.h>
39 #include <apt-pkg/macros.h>
41 #ifndef APT_8_CLEANER_HEADERS
59 return (*Cache)[Pkg].CandidateVerIter(*Cache);
72 virtual bool Install(
PkgIterator Pkg,std::string File);
78 void Describe(
PkgIterator iPkg,std::ostream &out,
bool Current,
bool Candidate);
99 enum Flags {Protected = (1 << 0), PreInstalled = (1 << 1),
100 Upgradable = (1 << 2), ReInstateTried = (1 << 3),
101 ToRemove = (1 << 4)};
103 unsigned char *Flags;
108 static int ScoreSort(
const void *a,
const void *b);
119 bool ResolveInternal(
bool const BrokenFix =
false);
120 bool ResolveByKeepInternal();
127 inline void Protect(
pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected; Cache.MarkProtected(Pkg);};
132 bool Resolve(
bool BrokenFix =
false);
135 bool ResolveByKeep();
137 __deprecated
void InstallProtect();
156 bool AcquireUpdate(
pkgAcquire &Fetcher,
int const PulseInterval = 0,
157 bool const RunUpdateScripts =
true,
bool const ListCleanup =
true);