From bc33e0f0b6b1fdb010dcd4a49a78b827530052aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 Feb 2011 12:50:47 +0100 Subject: * ftparchive/multicompress.cc, apt-inst/deb/debfile.cc: - support xz compressor to create xz-compressed Indexes and be able to open data.tar.xz files --- ftparchive/contents.cc | 6 +++++- ftparchive/multicompress.cc | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'ftparchive') diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index b761d9204..9e283cf33 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -317,9 +317,13 @@ bool ContentsExtract::Read(debDebFile &Deb) Member = Deb.GotoMember("data.tar.lzma"); Compressor = "lzma"; } + if (Member == 0) { + Member = Deb.GotoMember("data.tar.xz"); + Compressor = "xz"; + } if (Member == 0) { _error->Error(_("Internal error, could not locate member %s"), - "data.tar.{gz,bz2,lzma}"); + "data.tar.{gz,bz2,lzma,xz}"); return false; } diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc index bb4beedf9..c33414a11 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -35,6 +35,7 @@ const MultiCompress::CompType MultiCompress::Compressors[] = {"gzip",".gz","gzip","-9n","-d",2}, {"bzip2",".bz2","bzip2","-9","-d",3}, {"lzma",".lzma","lzma","-9","-d",4}, + {"xz",".xz","xz","-6","-d",5}, {}}; // MultiCompress::MultiCompress - Constructor /*{{{*/ -- cgit v1.2.3 From cd5b597cc855a535b35e88324191931c54c6fba0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 Feb 2011 14:52:10 +0100 Subject: * ftparchive/writer.cc: - include xz-compressed Packages and Sources files in Release file --- ftparchive/writer.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ftparchive') diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index d7d699ddc..086c44390 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -911,10 +911,12 @@ ReleaseWriter::ReleaseWriter(string const &DB) AddPattern("Packages.gz"); AddPattern("Packages.bz2"); AddPattern("Packages.lzma"); + AddPattern("Packages.xz"); AddPattern("Sources"); AddPattern("Sources.gz"); AddPattern("Sources.bz2"); AddPattern("Sources.lzma"); + AddPattern("Sources.xz"); AddPattern("Release"); AddPattern("md5sum.txt"); -- cgit v1.2.3