]> git.saurik.com Git - apt.git/commitdiff
fix pkgProblemResolver::Scores, thanks to Paul Wise.
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 8 Jan 2013 15:35:57 +0000 (16:35 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 8 Jan 2013 15:35:57 +0000 (16:35 +0100)
Closes: #697577
apt-pkg/algorithms.cc
apt-pkg/deb/deblistparser.cc
debian/changelog

index 8cd9d4c6eacc83f49e444911b395baa21bc4662d..75e914f7dda6e41a7a53478b7aa126089aedd1d8 100644 (file)
@@ -553,8 +553,8 @@ void pkgProblemResolver::MakeScores()
    // Important Required Standard Optional Extra
    int PrioMap[] = {
       0,
    // 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)
       _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
 
    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
          << "  Essentials => " << PrioEssentials << endl
          << "  InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl
          << "  Depends => " << PrioDepends << endl
index b84bd6fddb8fa974c9fdf5ba7323ce87d00ea82f..56d5297fc6ef9fc21bdd9441dc6f9c5db55acdad 100644 (file)
 
 using std::string;
 
 
 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                             /*{{{*/
 // ---------------------------------------------------------------------
 
 // ListParser::debListParser - Constructor                             /*{{{*/
 // ---------------------------------------------------------------------
index 1dc31af9fdbe95daccb489ab60c84f728818d637..dcc6e4d169ad4e90153ab624133f603b92a2c7de 100644 (file)
@@ -2,6 +2,10 @@ apt (0.9.7.8) UNRELEASED; urgency=low
 
   [ Manpages translation updates ]
   * Italian (Beatrice Torracca). Closes: #696601
 
   [ 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
 
 
  -- Christian Perrier <bubulle@debian.org>  Mon, 24 Dec 2012 07:01:20 +0100