summaryrefslogtreecommitdiff
path: root/apt-pkg/policy.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-09-14 18:57:46 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-09-14 18:57:46 +0200
commit5ed56f934dd204cc3a1d757ccf5eac23f8374736 (patch)
treeef9bc81beb82db782ade3d44837673a9c1f3e11d /apt-pkg/policy.cc
parent6874a1a88255fe0ab1b501961ce1fec26ee718a7 (diff)
* apt-pkg/policy.cc:
- support 100-pinning in Release file with ButAutomaticUpgrades as requested by the backports crew (Closes: #596097) * apt-pkg/deb/deblistparser.cc: - overrule NotAutomatic in case of ButAutomaticUpgrades
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r--apt-pkg/policy.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index a3286391b..4f9d56775 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -16,7 +16,7 @@
990 = Config file override package files
989 = Start for preference auto-priorities
500 = Default package files
- 100 = The status file
+ 100 = The status file and ButAutomaticUpgrades sources
0 -> 100 = NotAutomatic sources like experimental
-inf -> 0 = Never selected
@@ -70,9 +70,10 @@ bool pkgPolicy::InitDefaults()
PFPriority[I->ID] = 500;
if ((I->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
PFPriority[I->ID] = 100;
- else
- if ((I->Flags & pkgCache::Flag::NotAutomatic) == pkgCache::Flag::NotAutomatic)
- PFPriority[I->ID] = 1;
+ else if ((I->Flags & pkgCache::Flag::ButAutomaticUpgrades) == pkgCache::Flag::ButAutomaticUpgrades)
+ PFPriority[I->ID] = 100;
+ else if ((I->Flags & pkgCache::Flag::NotAutomatic) == pkgCache::Flag::NotAutomatic)
+ PFPriority[I->ID] = 1;
}
// Apply the defaults..