From: Raphael Hertzog Date: Fri, 4 Jul 2008 12:41:53 +0000 (+0200) Subject: Use description of installed package if it's not available anymore X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a55e2b0ff22aee1f6e972d1174a1845b40fc935;p=dpkg 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 . --- diff --git a/ChangeLog b/ChangeLog index d969a3f1..adc77649 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-04 Raphael Hertzog + Bruce Sass + + * 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 * lib/fields.c (convert_string): Remove unneeded variable assignments. diff --git a/THANKS b/THANKS index 31726197..9fe83024 100644 --- a/THANKS +++ b/THANKS @@ -21,6 +21,7 @@ Branden Robinson Branko Lankester Brian M. Carlson Bruce Perens +Bruce Sass Carl Streeter Carlos Laviola Carlos Z.F. Liu diff --git a/debian/changelog b/debian/changelog index ef049829..40bbb898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -62,6 +62,8 @@ dpkg (1.15.0) UNRELEASED; urgency=low they are not always available. Closes: #488293 * Improve error message in install-info when the file doesn't exist. Thanks to Thomas Hood . Closes: #107098 + * Use description of installed package as fallback in dselect. + Based on a patch from Bruce Sass . Closes: #21659 [ Pierre Habouzit ] * Add a --query option to update-alternatives. Closes: #336091, #441904 diff --git a/dselect/pkginfo.cc b/dselect/pkginfo.cc index 503d22d8..d8eecc72 100644 --- a/dselect/pkginfo.cc +++ b/dselect/pkginfo.cc @@ -108,6 +108,8 @@ void packagelist::itd_description() { if (table[cursorline]->pkg->name) { const char *m= table[cursorline]->pkg->available.description; + if (!m || !*m) + m = table[cursorline]->pkg->installed.description; if (!m || !*m) m = _("No description available."); const char *p= strchr(m,'\n'); diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc index 2a7c01de..3022c50b 100644 --- a/dselect/pkgtop.cc +++ b/dselect/pkgtop.cc @@ -221,7 +221,8 @@ void packagelist::redraw1itemsel(int index, int selected) { } 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++; } } else {