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

Remove obsolete ‘hold’ and ‘hold-reinstreq’ internal status flags

These flags have been obsolete for a long time, and the ‘hold’ part
has been converted to the ‘want_hold’ value on database parse. No
current system having been upgraded through several Debian releases
should have those values in their status database anymore.
Guillem Jover лет назад: 17
Родитель
Сommit
fb6c4a7a7a
7 измененных файлов с 6 добавлено и 14 удалено
  1. 1 0
      debian/changelog
  2. 1 1
      dselect/pkgdisplay.cc
  3. 1 4
      lib/dpkg-db.h
  4. 1 1
      lib/dump.c
  5. 0 4
      lib/fields.c
  6. 0 2
      lib/parsehelp.c
  7. 2 2
      src/query.c

+ 1 - 0
debian/changelog

@@ -19,6 +19,7 @@ dpkg (1.15.4) UNRELEASED; urgency=low
   * Document “hold” under package selection states instead of flags in dpkg(1).
   * Remove trailing ‘/’ and ‘/.’ from the directory name to be used as the
     package name on “dpkg-deb -b”. Closes: #218018, #373602
+  * Remove obsolete ‘hold’ and ‘hold-reinstreq’ internal status flags.
 
   [ Raphael Hertzog ]
   * Replace install-info by a wrapper around GNU's install-info. The wrapper

+ 1 - 1
dselect/pkgdisplay.cc

@@ -88,7 +88,7 @@ const char
 			       N_("?") };
 
 const char statuschars[] = " -IUCWt*";
-const char eflagchars[]=     " R?#";
+const char eflagchars[] = " R";
 const char wantchars[]=     "n*=-_";
 
 /* These MUST be in the same order as the corresponding enums in pkglist.h */

+ 1 - 4
lib/dpkg-db.h

@@ -147,12 +147,9 @@ struct pkginfo { /* pig */
   } want;
   enum pkgeflag {
     eflagf_reinstreq    = 01,
-    eflagf_obsoletehold = 02,
     eflagv_ok           = 0,
     eflagv_reinstreq    =    eflagf_reinstreq,
-    eflagv_obsoletehold =                       eflagf_obsoletehold,
-    eflagv_obsoleteboth =    eflagf_reinstreq | eflagf_obsoletehold
-  } eflag; /* bitmask, but obsoletehold no longer used except when reading */
+  } eflag; /* Bitmask. */
   enum pkgstatus {
     stat_notinstalled,
     stat_configfiles,

+ 1 - 1
lib/dump.c

@@ -168,7 +168,7 @@ void w_status(struct varbuf *vb,
               enum fwriteflags flags, const struct fieldinfo *fip) {
   if (pifp != &pigp->installed) return;
   assert(pigp->want <= want_purge);
-  assert(pigp->eflag <= eflagv_reinstreq); /* hold and hold-reinstreq NOT allowed */
+  assert(pigp->eflag <= eflagv_reinstreq);
 
 #define PEND pigp->trigpend_head
 #define AW pigp->trigaw.head

+ 0 - 4
lib/fields.c

@@ -171,10 +171,6 @@ void f_status(struct pkginfo *pigp, struct pkginfoperfile *pifp,
                               -1, pigp, value, wantinfos, &ep);
   pigp->eflag = convert_string(ps, _("second (error) word in `status' field"),
                                -1, pigp, ep, eflaginfos, &ep);
-  if (pigp->eflag & eflagf_obsoletehold) {
-    pigp->want= want_hold;
-    pigp->eflag &= ~eflagf_obsoletehold;
-  }
   pigp->status = convert_string(ps, _("third (status) word in `status' field"),
                                 -1, pigp, ep, statusinfos, NULL);
 }

+ 0 - 2
lib/parsehelp.c

@@ -119,8 +119,6 @@ const struct namevalue statusinfos[]= {  /* Note !  These must be in order ! */
 const struct namevalue eflaginfos[]= {  /* Note !  These must be in order ! */
   { "ok",                      eflagv_ok,                2 },
   { "reinstreq",               eflagv_reinstreq,         9 },
-  { "hold",                    eflagv_obsoletehold,      4 },
-  { "hold-reinstreq",          eflagv_obsoleteboth,      14 },
   {  NULL                                                   }
 };
 

+ 2 - 2
src/query.c

@@ -113,7 +113,7 @@ list1package(struct pkginfo *pkg, int *head, struct pkg_array *array)
     fputs(_("\
 Desired=Unknown/Install/Remove/Purge/Hold\n\
 | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend\n\
-|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)\n"), stdout);
+|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)\n"), stdout);
     printf(format,'|','|','/', _("Name"), _("Version"), 40, _("Description"));
     printf("+++-");					/* status */
     for (l=0;l<nw;l++) printf("="); printf("-");	/* packagename */
@@ -127,7 +127,7 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\
   printf(format,
          "uihrp"[pkg->want],
          "ncHUFWti"[pkg->status],
-         " R?#"[pkg->eflag],
+         " R"[pkg->eflag],
          pkg->name,
          versiondescribe(&pkg->installed.version, vdew_nonambig),
          l, pdesc);