Explorar el Código

dpkg-source: Change default source package compressor for new formats to xz

This does not affect V1.0, which only supports gzip compression.
Guillem Jover hace 12 años
padre
commit
62019c2756
Se han modificado 4 ficheros con 5 adiciones y 4 borrados
  1. 1 0
      debian/changelog
  2. 2 2
      man/dpkg-source.1
  3. 1 1
      scripts/Dpkg/Compression.pm
  4. 1 1
      scripts/Dpkg/Source/Package.pm

+ 1 - 0
debian/changelog

@@ -37,6 +37,7 @@ dpkg (1.17.6) UNRELEASED; urgency=low
   * Set default compression options in source format specific modules instead
   * Set default compression options in source format specific modules instead
     of dpkg-source. This makes sure the correct compression level is set, even
     of dpkg-source. This makes sure the correct compression level is set, even
     for “3.0 (native)” packages with non-default compressors. Closes: #733326
     for “3.0 (native)” packages with non-default compressors. Closes: #733326
+  * Change default source package compressor for new formats (>= 2.0) to xz.
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * Swedish (Peter Krefting).
   * Swedish (Peter Krefting).

+ 2 - 2
man/dpkg-source.1

@@ -167,8 +167,8 @@ Specify the compression to use for created files (tarballs and diffs).
 Note that this option will not cause existing tarballs to be recompressed,
 Note that this option will not cause existing tarballs to be recompressed,
 it only affects new files. Supported values are:
 it only affects new files. Supported values are:
 .IR gzip ", " bzip2 ", " lzma " and " xz .
 .IR gzip ", " bzip2 ", " lzma " and " xz .
-\fIgzip\fP is the default. \fIxz\fP is only supported since
-dpkg 1.15.5.
+The default is \fIxz\fP for formats 2.0 and newer, and \fIgzip\fP for
+format 1.0. \fIxz\fP is only supported since dpkg 1.15.5.
 .TP
 .TP
 .BR \-z "\fIlevel\fP, " \-\-compression\-level =\fIlevel\fP
 .BR \-z "\fIlevel\fP, " \-\-compression\-level =\fIlevel\fP
 Compression level to use. As with \fB\-Z\fP it only affects newly created
 Compression level to use. As with \fB\-Z\fP it only affects newly created

+ 1 - 1
scripts/Dpkg/Compression.pm

@@ -76,7 +76,7 @@ my $COMP = {
 
 
 # XXX: Backwards compatibility, stop exporting on VERSION 2.00.
 # XXX: Backwards compatibility, stop exporting on VERSION 2.00.
 ## no critic (Variables::ProhibitPackageVars)
 ## no critic (Variables::ProhibitPackageVars)
-our $default_compression = 'gzip';
+our $default_compression = 'xz';
 our $default_compression_level = undef;
 our $default_compression_level = undef;
 
 
 my $regex = join '|', map { $_->{file_ext} } values %$COMP;
 my $regex = join '|', map { $_->{file_ext} } values %$COMP;

+ 1 - 1
scripts/Dpkg/Source/Package.pm

@@ -227,7 +227,7 @@ sub init_options {
     $self->{options}{skip_debianization} ||= 0;
     $self->{options}{skip_debianization} ||= 0;
 
 
     # Set default compressor for new formats.
     # Set default compressor for new formats.
-    $self->{options}{compression} //= 'gzip';
+    $self->{options}{compression} //= 'xz';
     $self->{options}{comp_level} //= compression_get_property($self->{options}{compression},
     $self->{options}{comp_level} //= compression_get_property($self->{options}{compression},
                                                               'default_level');
                                                               'default_level');
     $self->{options}{comp_ext} //= compression_get_property($self->{options}{compression},
     $self->{options}{comp_ext} //= compression_get_property($self->{options}{compression},