summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorMatt Zimmerman <matt.zimmerman@canonical.com>2004-12-12 17:51:33 +0000
committerMatt Zimmerman <matt.zimmerman@canonical.com>2004-12-12 17:51:33 +0000
commitb21c043804b1be7f4d79ac3f5a6615dc96f26a42 (patch)
tree6c00f8b2637fe3f2fff706a8af7d34105a45c7a0 /ftparchive
parentef86e052e562d84c87fc2280887cb95cc9676b8f (diff)
downloadapt-b21c043804b1be7f4d79ac3f5a6615dc96f26a42.tar.gz
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
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/contents.cc11
1 files changed, 9 insertions, 2 deletions
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;