Przeglądaj źródła

dpkg-deb: Deprecate compressing .deb files with lzma

The the format has several deficiencies that have been addressed by
upstream in xz. Although unpacking will be kept being supported to
handle existing lzma compressed .deb files.

Issue a warning for now for the -Zlzma option value, the support for
that value will get removed at a later point.
Guillem Jover 14 lat temu
rodzic
commit
cebaf7e0f2
3 zmienionych plików z 19 dodań i 1 usunięć
  1. 6 0
      debian/changelog
  2. 10 0
      doc/README.feature-removal-schedule
  3. 3 1
      dpkg-deb/main.c

+ 6 - 0
debian/changelog

@@ -1,5 +1,11 @@
 dpkg (1.16.4) UNRELEASED; urgency=low
 
+  [ Guillem Jover ]
+  * Deprecate compressing .deb files with lzma, by making dpkg-deb issue a
+    warning, as the format has several deficiencies that have been addressed
+    by upstream in xz. Although unpacking will be kept being supported to
+    handle existing lzma compressed .deb files.
+
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
 

+ 10 - 0
doc/README.feature-removal-schedule

@@ -60,6 +60,16 @@ Why:
  leftovers are automatically cleaned up on database parsing. So there's no
  need anymore for this manual action.
 
+What: -Zlzma (dpkg-deb option value)
+Status: deprecated
+When: 1.17.x
+Warning: program
+Why:
+ LZMA compression has some format deficiencies fixed by XZ, which is what
+ upstream has replaced it with, 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.
+
 History of feature removals
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

+ 3 - 1
dpkg-deb/main.c

@@ -105,7 +105,7 @@ usage(const struct cmdinfo *cip, const char *value)
 "                                     packages).\n"
 "  -z#                              Set the compression level when building.\n"
 "  -Z<type>                         Set the compression type used when building.\n"
-"                                     Allowed types: gzip, xz, bzip2, lzma, none.\n"
+"                                     Allowed types: gzip, xz, bzip2, none.\n"
 "  -S<strategy>                     Set the compression strategy when building.\n"
 "                                     Allowed values: extreme (xz).\n"
 "\n"));
@@ -166,6 +166,8 @@ setcompresstype(const struct cmdinfo *cip, const char *value)
   compress_params.type = compressor_find_by_name(value);
   if (compress_params.type == compressor_type_unknown)
     ohshit(_("unknown compression type `%s'!"), value);
+  if (compress_params.type == compressor_type_lzma)
+    warning(_("deprecated compression type '%s'; use xz instead"), value);
 }
 
 static const struct cmdinfo cmdinfos[]= {