Просмотр исходного кода

dselect: Fix typo in package deselection condition

The test was always false due to the typo.
Guillem Jover лет назад: 17
Родитель
Сommit
4bd14c490b
2 измененных файлов с 7 добавлено и 5 удалено
  1. 2 0
      debian/changelog
  2. 5 5
      dselect/pkgdepcon.cc

+ 2 - 0
debian/changelog

@@ -21,6 +21,8 @@ dpkg (1.15.4) UNRELEASED; urgency=low
     package name on “dpkg-deb -b”. Closes: #218018, #373602
   * Remove obsolete ‘hold’ and ‘hold-reinstreq’ internal status flags.
   * Add fakeroot to dpkg-dev Recommends. Closes: #536821
+  * Fix an always false test when trying to decide which package to deselect
+    to resolve a dependency problem in dselect.
 
   [ Raphael Hertzog ]
   * Replace install-info by a wrapper around GNU's install-info. The wrapper

+ 5 - 5
dselect/pkgdepcon.cc

@@ -182,11 +182,11 @@ int packagelist::deselect_one_of(pkginfo *per, pkginfo *ped, dependency *display
     best = er;
   else if (er->spriority < ed->spriority) best= er; // We'd rather change the
   else if (er->spriority > ed->spriority) best= ed; // one with the lowest priority.
-  else if (er->pkg->priority >
-           er->pkg->priority) best= er;         // ... failing that the one with
-  else if (er->pkg->priority <                  //  the highest priority
-           er->pkg->priority) best= ed;
-  
+  // ... failing that the one with the highest priority
+  else if (er->pkg->priority > ed->pkg->priority)
+    best = er;
+  else if (er->pkg->priority < ed->pkg->priority)
+    best = ed;
   else best= ed;                                      // ... failing that, the second
 
   if (depdebug && debug)