summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-01-08 18:00:16 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2013-01-08 18:00:16 +0100
commitcd69e44638498a1092ea8aa23c55f73ebd096b9b (patch)
treeb0f9e26208d96f7316b3eaee91a56e8bdd71fb2e
parent95795be79b0ed520d84b2db5c9c0d0c0637a43f6 (diff)
parentc0751c067f54de860a6372022ad64b9518c91391 (diff)
merged from the debian-sid branch
-rw-r--r--apt-pkg/algorithms.cc19
-rw-r--r--apt-pkg/deb/deblistparser.cc13
-rw-r--r--debian/changelog4
3 files changed, 22 insertions, 14 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 8cd9d4c6e..7fcd9f0db 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -550,11 +550,14 @@ void pkgProblemResolver::MakeScores()
unsigned long Size = Cache.Head().PackageCount;
memset(Scores,0,sizeof(*Scores)*Size);
- // Important Required Standard Optional Extra
+ // Maps to pkgCache::State::VerPriority
+ // which is "Important Required Standard Optional Extra"
+ // (yes, that is confusing, the order of pkgCache::State::VerPriority
+ // needs to be adjusted but that requires a ABI break)
int PrioMap[] = {
0,
- _config->FindI("pkgProblemResolver::Scores::Important",3),
- _config->FindI("pkgProblemResolver::Scores::Required",2),
+ _config->FindI("pkgProblemResolver::Scores::Important",2),
+ _config->FindI("pkgProblemResolver::Scores::Required",3),
_config->FindI("pkgProblemResolver::Scores::Standard",1),
_config->FindI("pkgProblemResolver::Scores::Optional",-1),
_config->FindI("pkgProblemResolver::Scores::Extra",-2)
@@ -568,11 +571,11 @@ void pkgProblemResolver::MakeScores()
if (_config->FindB("Debug::pkgProblemResolver::ShowScores",false) == true)
clog << "Settings used to calculate pkgProblemResolver::Scores::" << endl
- << " Important => " << PrioMap[1] << endl
- << " Required => " << PrioMap[2] << endl
- << " Standard => " << PrioMap[3] << endl
- << " Optional => " << PrioMap[4] << endl
- << " Extra => " << PrioMap[5] << endl
+ << " Required => " << PrioMap[pkgCache::State::Required] << endl
+ << " Important => " << PrioMap[pkgCache::State::Important] << endl
+ << " Standard => " << PrioMap[pkgCache::State::Standard] << endl
+ << " Optional => " << PrioMap[pkgCache::State::Optional] << endl
+ << " Extra => " << PrioMap[pkgCache::State::Extra] << endl
<< " Essentials => " << PrioEssentials << endl
<< " InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl
<< " Depends => " << PrioDepends << endl
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b84bd6fdd..56d5297fc 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -28,12 +28,13 @@
using std::string;
-static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important},
- {"required",pkgCache::State::Required},
- {"standard",pkgCache::State::Standard},
- {"optional",pkgCache::State::Optional},
- {"extra",pkgCache::State::Extra},
- {}};
+static debListParser::WordList PrioList[] = {
+ {"required",pkgCache::State::Required},
+ {"important",pkgCache::State::Important},
+ {"standard",pkgCache::State::Standard},
+ {"optional",pkgCache::State::Optional},
+ {"extra",pkgCache::State::Extra},
+ {}};
// ListParser::debListParser - Constructor /*{{{*/
// ---------------------------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index bc1a70d6f..3213a62c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,10 @@ apt (0.9.7.8) UNRELEASED; urgency=low
[ Manpages translation updates ]
* Italian (Beatrice Torracca). Closes: #696601
+
+ [ Michael Vogt ]
+ * fix pkgProblemResolver::Scores, thanks to Paul Wise.
+ Closes: #697577
-- Christian Perrier <bubulle@debian.org> Mon, 24 Dec 2012 07:01:20 +0100