From b21c043804b1be7f4d79ac3f5a6615dc96f26a42 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sun, 12 Dec 2004 17:51:33 +0000 Subject: Merge bzip2-debs branch Patches applied: * apt@packages.debian.org/apt--bzip2-debs--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-30 * apt@packages.debian.org/apt--bzip2-debs--0--patch-1 Create baz branch * apt@packages.debian.org/apt--bzip2-debs--0--patch-2 Implement data.tar.bz2 support --- ftparchive/contents.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ftparchive/contents.cc') diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index 4f2b1d163..e11c16ca2 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -308,11 +308,18 @@ bool ContentsExtract::Read(debDebFile &Deb) // Get the archive member and positition the file const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); - if (Member == 0) + const char *Compressor = "gzip"; + if (Member == 0) { + Member = Deb.GotoMember("data.tar.bz2"); + Compressor = "bzip2"; + } + if (Member == 0) { + _error->Error(_("Internal Error, could not locate member %s"),"data.tar.gz"); return false; + } // Extract it. - ExtractTar Tar(Deb.GetFile(),Member->Size); + ExtractTar Tar(Deb.GetFile(),Member->Size,Compressor); if (Tar.Go(*this) == false) return false; return true; -- cgit v1.2.3-70-g09d2