diff options
-rw-r--r-- | apt-pkg/policy.cc | 8 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | po/apt-all.pot | 8 |
3 files changed, 13 insertions, 4 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 98576fc91..e33d563a1 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -120,6 +120,14 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator Pkg) signed Max = GetPriority(Pkg); pkgCache::VerIterator Pref = GetMatch(Pkg); + // no package = no candidate version + if (Pkg.end() == true) + return Pref; + + // packages with a pin lower than 0 have no newer candidate than the current version + if (Max < 0) + return Pkg.CurrentVer(); + /* Falling through to the default version.. Setting Max to zero effectively excludes everything <= 0 which are the non-automatic priorities.. The status file is given a prio of 100 which will exclude diff --git a/debian/changelog b/debian/changelog index ab8da4c6c..412435fad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,7 @@ apt (0.7.22) UNRELEASED; urgency=low * fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to work correctly when downloading from multiple sites (Closes: #534752) * add the various foldmarkers in apt-pkg & cmdline (no code change) + * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) [ Michael Vogt ] * honor the dpkg hold state in new Marker hooks (closes: #64141) diff --git a/po/apt-all.pot b/po/apt-all.pot index 12e15110e..199b7f843 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 21:08+0200\n" +"POT-Creation-Date: 2009-07-01 10:24+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -2381,16 +2381,16 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/policy.cc:281 +#: apt-pkg/policy.cc:289 msgid "Invalid record in the preferences file, no Package header" msgstr "" -#: apt-pkg/policy.cc:303 +#: apt-pkg/policy.cc:311 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:311 +#: apt-pkg/policy.cc:319 msgid "No priority (or zero) specified for pin" msgstr "" |