]> err.no Git - dpkg/commitdiff
Show the epoch (if present) when displaying package versions.
authorGuillem Jover <guillem@debian.org>
Wed, 21 Mar 2007 21:45:46 +0000 (21:45 +0000)
committerGuillem Jover <guillem@debian.org>
Wed, 21 Mar 2007 21:45:46 +0000 (21:45 +0000)
Closes: #107449, #179913, #345594, #393924, #405668
Based on a patch by Jeffrey W. Baker.

ChangeLog
debian/changelog
dselect/pkgsublist.cc
dselect/pkgtop.cc
src/archives.c
src/configure.c
src/query.c

index b3468bf2229099ae36e11814c1b199610f702d70..407ed3dd1eb85834dc5d4e411838e125aa3eeed1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-03-21  Jeffrey W. Baker  <jwbaker@acm.org>
+            Guillem Jover  <guillem@debian.org>
+
+       * src/archives.c (wanttoinstall): Use vdew_nonambig instead of
+       vdew_never on versiondescribe.
+       * src/configure.c (deferred_configure): Likewise.
+       * src/query.c (list1package): Likewise.
+       * dselect/pkgsublist.cc (packagelist::add): Likewise.
+       * dselect/pkgtop.cc (packagelist::redraw1itemsel): Likewise.
+
 2007-03-21  Guillem Jover  <guillem@debian.org>
 
        * dselect/main.cc: Remove duplicated included files <sys/types.h> and
index c85c5c273faf1f9200f59f8a0d3f47827ea2894e..9b5f77d9ed35c1edca20b8a9605d2dc8666b7cc9 100644 (file)
@@ -54,6 +54,9 @@ dpkg (1.14.0) UNRELEASED; urgency=low
   * Support building binary packages with the member data.tar.lzma compressed
     with lzma.
   * Require gettext 0.16.1.
+  * Show the epoch (if present) when displaying package versions.
+    Closes: #107449, #179913, #345594, #393924, #405668
+    Based on a patch by Jeffrey W. Baker.
 
   [ Updated dpkg translations ]
   * Romanian (Eddy PetriČ™or).
index fe41ebc2b12cbc063640e5dbd3eed55499000575..7046b6fe9cef2a93a3f0645befa55deb20d0b5cf 100644 (file)
@@ -131,7 +131,7 @@ int packagelist::add(dependency *depends, showpriority displayimportance) {
       case dvr_exact:         info(" (= "); break;
       default: internerr("unknown verrel");
       }
-      info(versiondescribe(&possi->version,vdew_never));
+      info(versiondescribe(&possi->version, vdew_nonambig));
       info(")");
     }
   }
index 385ed53f2dbf535ce23475a0582ff6b452c3e101..8edde4136afd7f048d35377c8ed82c5dcccd97f8 100644 (file)
@@ -208,14 +208,14 @@ void packagelist::redraw1itemsel(int index, int selected) {
     if (versioninstalled_width)
       mvwprintw(listpad,index,versioninstalled_column, "%-*.*s ",
                 versioninstalled_width, versioninstalled_width,
-                versiondescribe(&pkg->installed.version,vdew_never));
+                versiondescribe(&pkg->installed.version, vdew_nonambig));
     if (versionavailable_width) {
       if (informativeversion(&pkg->available.version) &&
           versioncompare(&pkg->available.version,&pkg->installed.version) > 0)
         wattrset(listpad, selected ? selstatesel_attr : selstate_attr);
       mvwprintw(listpad,index,versionavailable_column, "%-*.*s",
                 versionavailable_width, versionavailable_width,
-                versiondescribe(&pkg->available.version,vdew_never));
+                versiondescribe(&pkg->available.version, vdew_nonambig));
       wattrset(listpad, selected ? listsel_attr : list_attr);
       waddch(listpad,' ');
     }
index 0ba14d55c55f84de1c1f258fdb6daf08d6d2d7ab..38e2b56a36b2a8eb08f83625d8eca65b5f36cb0d 100644 (file)
@@ -1084,7 +1084,6 @@ int wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver, int sa
    * also return -1 to mean it doesn't know because it would depend on
    * the version number.
    */
-  enum versiondisplayepochwhen needepochs;
   int r;
 
   if (pkg->want != want_install && pkg->want != want_hold) {
@@ -1111,26 +1110,24 @@ int wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver, int sa
    pkg->status == stat_installed && !(pkg->eflag &= eflagf_reinstreq)) {
       if (saywhy) fprintf(stderr, _("Version %.250s of %.250s already installed, "
              "skipping.\n"),
-             versiondescribe(&pkg->installed.version,vdew_never),
+             versiondescribe(&pkg->installed.version, vdew_nonambig),
              pkg->name);
       return 0;
     } else {
       return 1;
     }
   } else {
-    needepochs= epochsdiffer(&pkg->available.version,&pkg->installed.version) ?
-      vdew_always : vdew_never;
     if (fc_downgrade) {
       if (saywhy) fprintf(stderr, _("%s - warning: downgrading %.250s "
              "from %.250s to %.250s.\n"), DPKG, pkg->name,
-             versiondescribe(&pkg->installed.version,needepochs),
-             versiondescribe(&pkg->available.version,needepochs));
+             versiondescribe(&pkg->installed.version, vdew_nonambig),
+             versiondescribe(&pkg->available.version, vdew_nonambig));
       return 1;
     } else {
       if (saywhy) fprintf(stderr, _("Will not downgrade %.250s from version %.250s "
              "to %.250s, skipping.\n"), pkg->name,
-             versiondescribe(&pkg->installed.version,needepochs),
-             versiondescribe(&pkg->available.version,needepochs));
+             versiondescribe(&pkg->installed.version, vdew_nonambig),
+             versiondescribe(&pkg->available.version, vdew_nonambig));
       return 0;
     }
   }
index 197ebe7808480a0fc980a30746440ca9e01e56af..0df4582c3338ffa2d6cc9adab6b9c2cded8a289d 100644 (file)
@@ -131,7 +131,7 @@ void deferred_configure(struct pkginfo *pkg) {
                                        " reinstall it before attempting configuration."));
 
        printf(_("Setting up %s (%s) ...\n"),pkg->name,
-                       versiondescribe(&pkg->installed.version,vdew_never));
+              versiondescribe(&pkg->installed.version, vdew_nonambig));
 
        if (f_noact) {
                pkg->status= stat_installed;
index cc1324f0929e8ac37ca3d6efd6afd016df9f6eb1..1addb0826bd2d04f96f6f709cf8479c497fa286e 100644 (file)
@@ -139,7 +139,7 @@ static void list1package(struct pkginfo *pkg, int *head,
        if (!pdesc) pdesc= _("(no description available)");
 
        plen= strlen(pkgl[i]->name);
-       vlen= strlen(versiondescribe(&pkgl[i]->installed.version,vdew_never));
+       vlen = strlen(versiondescribe(&pkgl[i]->installed.version, vdew_nonambig));
        dlen= strcspn(pdesc, "\n");
        if (plen > nw) nw = plen;
        if (vlen > vw) vw = vlen;
@@ -176,7 +176,7 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\
          "nUFiHc"[pkg->status],
          " R?#"[pkg->eflag],
          pkg->name,
-         versiondescribe(&pkg->installed.version,vdew_never),
+         versiondescribe(&pkg->installed.version, vdew_nonambig),
          l, pdesc);
 }