From 5ed56f934dd204cc3a1d757ccf5eac23f8374736 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 14 Sep 2010 18:57:46 +0200 Subject: * 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 --- apt-pkg/policy.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apt-pkg/policy.cc') 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.. -- cgit v1.2.3