summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/deb/debfile.cc8
-rw-r--r--debian/changelog6
-rw-r--r--ftparchive/contents.cc6
-rw-r--r--ftparchive/multicompress.cc1
-rw-r--r--ftparchive/writer.cc2
-rw-r--r--test/integration/framework9
6 files changed, 25 insertions, 7 deletions
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index cd7a88808..edd78adbb 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -46,7 +46,9 @@ debDebFile::debDebFile(FileFd &File) : File(File), AR(File)
if (!CheckMember("data.tar.gz") &&
!CheckMember("data.tar.bz2") &&
- !CheckMember("data.tar.lzma")) {
+ !CheckMember("data.tar.lzma") &&
+ !CheckMember("data.tar.xz")) {
+ // FIXME: add data.tar.xz here - adding it now would require a Translation round for a very small gain
_error->Error(_("This is not a valid DEB archive, it has no '%s', '%s' or '%s' member"), "data.tar.gz", "data.tar.bz2", "data.tar.lzma");
return;
}
@@ -136,6 +138,10 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream)
Member = AR.FindMember("data.tar.lzma");
Compressor = "lzma";
}
+ if (Member == 0) {
+ Member = AR.FindMember("data.tar.xz");
+ Compressor = "xz";
+ }
if (Member == 0)
return _error->Error(_("Internal error, could not locate member"));
if (File.Seek(Member->Start) == false)
diff --git a/debian/changelog b/debian/changelog
index bbb973b8f..92ae058c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,11 +6,15 @@ apt (0.8.11.6) UNRELEASED; urgency=low
* Complete French manpage translation
[ David Kalnischkies ]
+ * 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/writer.cc:
- ensure that Date and Valid-Until time strings are not localised
- add options to disable specific checksums for Indexes
+ - include xz-compressed Packages and Sources files in Release file
- -- David Kalnischkies <kalnischkies@gmail.com> Tue, 22 Feb 2011 14:48:21 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Tue, 22 Feb 2011 14:59:51 +0100
apt (0.8.11.5) unstable; urgency=low
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index b761d9204..9e283cf33 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -318,8 +318,12 @@ bool ContentsExtract::Read(debDebFile &Deb)
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 /*{{{*/
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index d3a19ca28..9462ebe27 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -930,10 +930,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("Index");
AddPattern("md5sum.txt");
diff --git a/test/integration/framework b/test/integration/framework
index 7e1d25e61..71e7e476c 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -328,10 +328,10 @@ createaptftparchiveconfig() {
echo -n '";
};
Default {
- Packages::Compress ". gzip bzip2 lzma";
- Sources::Compress ". gzip bzip2 lzma";
- Contents::Compress ". gzip bzip2 lzma";
- Translation::Compress ". gzip bzip2 lzma";
+ Packages::Compress ". gzip bzip2 lzma xz";
+ Sources::Compress ". gzip bzip2 lzma xz";
+ Contents::Compress ". gzip bzip2 lzma xz";
+ Translation::Compress ". gzip bzip2 lzma xz";
LongDescription "false";
};
TreeDefault {
@@ -438,6 +438,7 @@ buildaptarchivefromfiles() {
cat ${line} | gzip > ${line}.gz
cat ${line} | bzip2 > ${line}.bz2
cat ${line} | lzma > ${line}.lzma
+ cat ${line} | xz > ${line}.xz
msgdone "info"
done
generatereleasefiles