summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-01-08 16:35:57 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2013-01-08 16:35:57 +0100
commit84de0ceaad7e8c74f47e06bccba83b1b310262b6 (patch)
treed0a58fca8103841a65a7755b45755fab52154274 /apt-pkg
parentd663a4c8a8723ae4936d10d0a98ea2c05a29cbc4 (diff)
fix pkgProblemResolver::Scores, thanks to Paul Wise.
Closes: #697577
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc14
-rw-r--r--apt-pkg/deb/deblistparser.cc13
2 files changed, 14 insertions, 13 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 8cd9d4c6e..75e914f7d 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -553,8 +553,8 @@ void pkgProblemResolver::MakeScores()
// Important Required Standard Optional Extra
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 +568,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 /*{{{*/
// ---------------------------------------------------------------------