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

Use description of installed package if it's not available anymore

* dselect/pkginfo.cc (packagelist::itd_description), dselect/pkgtop.cc
(packagelist::redraw1itemsel): Use description of installed
package as a fallback if the package is not more listed in the
available list.

Based on a patch by Bruce Sass <bmsass@shaw.ca>.
Raphael Hertzog лет назад: 18
Родитель
Сommit
7a55e2b0ff
5 измененных файлов с 15 добавлено и 1 удалено
  1. 8 0
      ChangeLog
  2. 1 0
      THANKS
  3. 2 0
      debian/changelog
  4. 2 0
      dselect/pkginfo.cc
  5. 2 1
      dselect/pkgtop.cc

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2008-07-04  Raphael Hertzog  <hertzog@debian.org>
+            Bruce Sass <bmsass@shaw.ca>
+
+	* dselect/pkginfo.cc (packagelist::itd_description), dselect/pkgtop.cc
+	(packagelist::redraw1itemsel): Use description of installed
+	package as a fallback if the package is not more listed in the
+	available list.
+
 2008-07-02  Guillem Jover  <guillem@debian.org>
 2008-07-02  Guillem Jover  <guillem@debian.org>
 
 
 	* lib/fields.c (convert_string): Remove unneeded variable assignments.
 	* lib/fields.c (convert_string): Remove unneeded variable assignments.

+ 1 - 0
THANKS

@@ -21,6 +21,7 @@ Branden Robinson <branden@debian.org>
 Branko Lankester
 Branko Lankester
 Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
 Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
 Bruce Perens <bruce@pixar.com>
 Bruce Perens <bruce@pixar.com>
+Bruce Sass <bmsass@shaw.ca>
 Carl Streeter <streeter@cae.wisc.edu>
 Carl Streeter <streeter@cae.wisc.edu>
 Carlos Laviola <claviola@brfree.com.br>
 Carlos Laviola <claviola@brfree.com.br>
 Carlos Z.F. Liu <carlosliu@users.sourceforge.net>
 Carlos Z.F. Liu <carlosliu@users.sourceforge.net>

+ 2 - 0
debian/changelog

@@ -62,6 +62,8 @@ dpkg (1.15.0) UNRELEASED; urgency=low
     they are not always available. Closes: #488293
     they are not always available. Closes: #488293
   * Improve error message in install-info when the file doesn't exist.
   * Improve error message in install-info when the file doesn't exist.
     Thanks to Thomas Hood <jdthood@yahoo.co.uk>. Closes: #107098
     Thanks to Thomas Hood <jdthood@yahoo.co.uk>. Closes: #107098
+  * Use description of installed package as fallback in dselect.
+    Based on a patch from Bruce Sass <bmsass@shaw.ca>. Closes: #21659
 
 
   [ Pierre Habouzit ]
   [ Pierre Habouzit ]
   * Add a --query option to update-alternatives. Closes: #336091, #441904
   * Add a --query option to update-alternatives. Closes: #336091, #441904

+ 2 - 0
dselect/pkginfo.cc

@@ -108,6 +108,8 @@ void packagelist::itd_description() {
 
 
   if (table[cursorline]->pkg->name) {
   if (table[cursorline]->pkg->name) {
     const char *m= table[cursorline]->pkg->available.description;
     const char *m= table[cursorline]->pkg->available.description;
+    if (!m || !*m)
+      m = table[cursorline]->pkg->installed.description;
     if (!m || !*m)
     if (!m || !*m)
       m = _("No description available.");
       m = _("No description available.");
     const char *p= strchr(m,'\n');
     const char *p= strchr(m,'\n');

+ 2 - 1
dselect/pkgtop.cc

@@ -221,7 +221,8 @@ void packagelist::redraw1itemsel(int index, int selected) {
     }
     }
 
 
     i= description_width;
     i= description_width;
-    p= info->description ? info->description : "";
+    p= info->description ? info->description :
+       pkg->installed.description ? pkg->installed.description : "";
     while (i>0 && *p && *p != '\n') { waddnstr(listpad,p,1); i--; p++; }
     while (i>0 && *p && *p != '\n') { waddnstr(listpad,p,1); i--; p++; }
       
       
   } else {
   } else {