The following commit has been merged in the master branch:
commit 54be54799fd73850a6e869e3a8e270b35a9f7384
Author: Guillem Jover <[email protected]>
Date:   Thu Feb 25 05:09:25 2010 +0100

    Use xz-utils instead of lzma for the lzma compression format
    
    We avoid unneeded dependencies on lzma in dpkg and dpk-dev.

diff --git a/debian/changelog b/debian/changelog
index 25483c9..56129c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -118,6 +118,8 @@ dpkg (1.15.6) UNRELEASED; urgency=low
   * Add support for xz compressed data.tar member of binary packages. Add
     xz-utils to dpkg's Pre-Depends. Closes: #542160
     Thanks to Jonathan Nieder for the initial patch.
+  * Use xz command to handle lzma compressed files in dpkg and dpkg-dev.
+    This removes the lzma package from both dpkg and dpkg-dev dependencies.
 
   [ Modestas Vainius ]
   * Implement symbol patterns (Closes: #563752). From now on, it is possible to
diff --git a/debian/control b/debian/control
index d36039b..d6bd45e 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 6.0.7), pkg-config, po4a (>= 
0.33.1),
 Package: dpkg
 Architecture: any
 Essential: yes
-Pre-Depends: ${shlibs:Depends}, coreutils (>= 5.93-1), lzma, xz-utils
+Pre-Depends: ${shlibs:Depends}, coreutils (>= 5.93-1), xz-utils
 Depends: ${misc:Depends}
 Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11),
  dpkg-dev (<< 1.14.16), apt (<< 0.7.7), aptitude (<< 0.4.7-1)
@@ -40,7 +40,7 @@ Package: dpkg-dev
 Section: utils
 Priority: optional
 Architecture: all
-Depends: dpkg (>= 1.15.4), perl, bzip2, lzma, xz-utils,
+Depends: dpkg (>= 1.15.4), perl, bzip2, xz-utils,
  patch (>= 2.2-1), make, binutils, libtimedate-perl,
  base-files (>= 5.0.0), ${misc:Depends}
 Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg, gpgv
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 51f5b89..c375f55 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -355,7 +355,7 @@ struct compressor compressor_xz = {
 static void DPKG_ATTR_NORET
 decompress_lzma(int fd_in, int fd_out, const char *desc)
 {
-       fd_fd_filter(fd_in, fd_out, desc, LZMA, "-dc", NULL);
+       fd_fd_filter(fd_in, fd_out, desc, XZ, "-dc", "--format=lzma", NULL);
 }
 
 static void DPKG_ATTR_NORET
@@ -364,7 +364,7 @@ compress_lzma(int fd_in, int fd_out, int compress_level, 
const char *desc)
        char combuf[6];
 
        snprintf(combuf, sizeof(combuf), "-c%d", compress_level);
-       fd_fd_filter(fd_in, fd_out, desc, LZMA, combuf, NULL);
+       fd_fd_filter(fd_in, fd_out, desc, XZ, combuf, "--format=lzma", NULL);
 }
 
 struct compressor compressor_lzma = {
diff --git a/lib/dpkg/compress.h b/lib/dpkg/compress.h
index 3a3d0b5..e1a266f 100644
--- a/lib/dpkg/compress.h
+++ b/lib/dpkg/compress.h
@@ -29,7 +29,6 @@ DPKG_BEGIN_DECLS
 #define GZIP           "gzip"
 #define XZ             "xz"
 #define BZIP2          "bzip2"
-#define LZMA           "lzma"
 
 struct compressor {
        const char *name;
diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm
index c18b01d..2e190ec 100644
--- a/scripts/Dpkg/Compression.pm
+++ b/scripts/Dpkg/Compression.pm
@@ -60,8 +60,8 @@ my $COMP = {
     },
     "lzma" => {
        "file_ext" => "lzma",
-       "comp_prog" => [ "lzma" ],
-       "decomp_prog" => [ "unlzma" ],
+       "comp_prog" => [ 'xz', '--format=lzma' ],
+       "decomp_prog" => [ 'unxz', '--format=lzma' ],
     },
     "xz" => {
        "file_ext" => "xz",

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to