Преглед изворни кода

dpkg-deb: Deprecate compressing .deb files with bzip2

This compressor has been superseded by xz when it comes to compression
ratio, and in cases where higher compatibility or raw speed is desired
gzip is still the better option.

Issue a warning for now for the -Zbzip2 option value, the support for
that value will get disabled at a later point.
Guillem Jover пре 12 година
родитељ
комит
9c049f43b8
3 измењених фајлова са 18 додато и 0 уклоњено
  1. 5 0
      debian/changelog
  2. 11 0
      doc/README.feature-removal-schedule
  3. 2 0
      dpkg-deb/main.c

+ 5 - 0
debian/changelog

@@ -83,6 +83,11 @@ dpkg (1.17.7) UNRELEASED; urgency=low
     from pipes, or standard input if the argument is omitted or is ‘-’.
     Closes: #357093, #367297
   * Error out on not-installed packages passed to «dpkg --verify».
+  * Deprecate compressing .deb files with bzip2, by making dpkg-deb issue a
+    warning, as the compressor has been superseded by xz when it comes to
+    compression ratio, and in cases where higher compatibility or raw speed
+    is desired gzip is still the better option. Although unpacking will be
+    kept being supported to handle existing bzip2 compressed .deb files.
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

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

@@ -54,6 +54,17 @@ Why:
  support compressing new .deb files with that format, although unpacking
  will be kept being supported to handle existing compressed files.
 
+What: -Zbzip2 (dpkg-deb option value)
+Status: deprecated
+When: 1.18.x
+Warning: program
+Why:
+ bzip2 compression has been superseded by xz when it comes to size, and
+ gzip is still faster, in Debian there's really not many packages using
+ 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: --control-path (dpkg-query option)
 Status: deprecated
 When: 1.18.x

+ 2 - 0
dpkg-deb/main.c

@@ -215,6 +215,8 @@ set_compress_type(const struct cmdinfo *cip, const char *value)
     ohshit(_("unknown compression type `%s'!"), value);
   if (compress_params.type == compressor_type_lzma)
     warning(_("deprecated compression type '%s'; use xz instead"), value);
+  if (compress_params.type == compressor_type_bzip2)
+    warning(_("deprecated compression type '%s'; use xz or gzip instead"), value);
 }
 
 static const struct cmdinfo cmdinfos[]= {