Browse Source

dpkg-deb: Remove obsolete --old and --new options

Guillem Jover 7 years ago
parent
commit
b42e8e0a76
4 changed files with 10 additions and 37 deletions
  1. 1 0
      debian/changelog
  2. 9 9
      doc/README.feature-removal-schedule
  3. 0 22
      dpkg-deb/main.c
  4. 0 6
      man/dpkg-deb.man

+ 1 - 0
debian/changelog

@@ -7,6 +7,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
   * Add support to dpkg-scanpackages for scanning a single binary file.
     Thanks to Javier Serrano Polo <javier@jasp.net>. Closes: #833964
   * Obsolete dpkg-deb bzip2 and lzma compression methods by emitting errors.
+  * Remove obsolete dpkg-deb --old and --new options.
   * Perl modules:
     - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
   * Packaging:

+ 9 - 9
doc/README.feature-removal-schedule

@@ -37,15 +37,6 @@ Warning: man page
  required to avoid hardcoding the database layout, and it will be kept as
  long as there's legitimate uses for it and no viable replacements.
 
-What: --new, --old (dpkg-deb options)
-Status: deprecated
-When: 1.18.x
-Warning: program
-Why:
- These options are not future-proof, and do not give the caller any
- guarantee of what exact format version will be used to produce the
- output file. They have been replaced with a new --deb-format option.
-
 What: -L (dpkg-parsechangelog option)
 Status: obsolete
 Since: 1.18.8
@@ -172,3 +163,12 @@ Why:
  that compression, as such there's no point in continuing to support
  compressing new .deb files with that format, although unpacking
  will be kept being supported to handle existing compressed files.
+
+What: --new, --old (dpkg-deb options)
+Status: removed
+When: 1.18.11
+Warning: program
+Why:
+ These options are not future-proof, and do not give the caller any
+ guarantee of what exact format version will be used to produce the
+ output file. They were replaced with a new --deb-format option.

+ 0 - 22
dpkg-deb/main.c

@@ -102,8 +102,6 @@ usage(const struct cmdinfo *cip, const char *value)
 "      --showformat=<format>        Use alternative format for --show.\n"
 "      --deb-format=<format>        Select archive format.\n"
 "                                     Allowed values: 0.939000, 2.0 (default).\n"
-"      --old                        Legacy alias for '--deb-format=0.939000'.\n"
-"      --new                        Legacy alias for '--deb-format=2.0'.\n"
 "      --nocheck                    Suppress control file check (build bad\n"
 "                                     packages).\n"
 "      --uniform-compression        Use the compression params on all members.\n"
@@ -162,24 +160,6 @@ set_deb_format(const struct cmdinfo *cip, const char *value)
     badusage(_("unknown deb format version: %s"), value);
 }
 
-static void
-set_deb_old(const struct cmdinfo *cip, const char *value)
-{
-  deb_format = DEB_VERSION_OBJECT(0, 939000);
-
-  warning(_("obsolete option '--%s'; please use '--%s' instead"),
-          cip->olong, "deb-format=0.939000");
-}
-
-static void
-set_deb_new(const struct cmdinfo *cip, const char *value)
-{
-  deb_format = DEB_VERSION_OBJECT(2, 0);
-
-  warning(_("obsolete option '--%s'; please use '--%s' instead"),
-          cip->olong, "deb-format=2.0");
-}
-
 struct compress_params compress_params = {
   .type = DPKG_DEB_DEFAULT_COMPRESSOR,
   .strategy = COMPRESSOR_STRATEGY_NONE,
@@ -232,8 +212,6 @@ static const struct cmdinfo cmdinfos[]= {
   ACTION("show",          'W', 0, do_showinfo),
 
   { "deb-format",    0,   1, NULL,           NULL,         set_deb_format   },
-  { "new",           0,   0, NULL,           NULL,         set_deb_new      },
-  { "old",           0,   0, NULL,           NULL,         set_deb_old      },
   { "debug",         'D', 0, &debugflag,     NULL,         NULL,          1 },
   { "verbose",       'v', 0, &opt_verbose,   NULL,         NULL,          1 },
   { "nocheck",       0,   0, &nocheckflag,   NULL,         NULL,          1 },

+ 0 - 6
man/dpkg-deb.man

@@ -264,12 +264,6 @@ now obsolete; its only use is when building packages to be parsed by
 versions of dpkg older than 0.93.76 (September 1995), which was released
 as i386 a.out only.
 .TP
-.BR \-\-new
-This is a legacy alias for \fB\-\-deb\-format=2.0\fP.
-.TP
-.BR \-\-old
-This is a legacy alias for \fB\-\-deb\-format=0.939000\fP.
-.TP
 .BR \-\-nocheck
 Inhibits
 .BR "dpkg\-deb \-\-build" 's