summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2023-07-11 13:47:17 +0000
committerJulian Andres Klode <jak@debian.org>2023-07-11 13:47:17 +0000
commit7bb2b81090b1a5bd9ebb49a0d9fd5cfd9ddab95f (patch)
treec7b46bfd6100fd4634fdfa00a39336ad57a10c83 /apt-pkg/algorithms.h
parent50efb65f339e715e04af114bca44c9b8c53ad3ad (diff)
parent68ef41ea912f4879b0ee43419c13a3a8c9bfcd22 (diff)
Merge branch 'pu/ubuntu-bug-2025462' into 'main'
dist-upgrade: Revert phased updates using keeps only See merge request apt-team/apt!299
Diffstat (limited to 'apt-pkg/algorithms.h')
-rw-r--r--apt-pkg/algorithms.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 12a77d4b8..f06a38c1b 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -102,10 +102,16 @@ class APT_PUBLIC pkgProblemResolver /*{{{*/
typedef pkgCache::PrvIterator PrvIterator;
typedef pkgCache::Version Version;
typedef pkgCache::Package Package;
-
- enum Flags {Protected = (1 << 0), PreInstalled = (1 << 1),
- Upgradable = (1 << 2), ReInstateTried = (1 << 3),
- ToRemove = (1 << 4)};
+
+ enum Flags
+ {
+ Protected = (1 << 0),
+ PreInstalled = (1 << 1),
+ Upgradable = (1 << 2),
+ ReInstateTried = (1 << 3),
+ ToRemove = (1 << 4),
+ BrokenPolicyAllowed = (1 << 5)
+ };
int *Scores;
unsigned char *Flags;
bool Debug;
@@ -129,7 +135,10 @@ class APT_PUBLIC pkgProblemResolver /*{{{*/
inline void Protect(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected; Cache.MarkProtected(Pkg);};
inline void Remove(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= ToRemove;};
- inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);};
+ inline void Clear(pkgCache::PkgIterator Pkg) { Flags[Pkg->ID] &= ~(Protected | ToRemove | BrokenPolicyAllowed); };
+#ifdef APT_COMPILING_APT
+ inline void AllowBrokenPolicy(pkgCache::PkgIterator Pkg) { Flags[Pkg->ID] |= BrokenPolicyAllowed; };
+#endif
// Try to intelligently resolve problems by installing and removing packages
bool Resolve(bool BrokenFix = false, OpProgress * const Progress = NULL);