From ac005224d02d7d993074697f11009ff40f57cb6b Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 28 Jul 2007 12:25:01 -0300 Subject: * Applied patch from Guillem Jover to add support to add lzma support (closes: #408201) --- apt-inst/deb/debfile.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apt-inst') diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 9d83120f8..cd7a88808 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -44,8 +44,10 @@ debDebFile::debDebFile(FileFd &File) : File(File), AR(File) return; } - if (!CheckMember("data.tar.gz") && !CheckMember("data.tar.bz2")) { - _error->Error(_("This is not a valid DEB archive, it has no '%s' or '%s' member"), "data.tar.gz", "data.tar.bz2"); + if (!CheckMember("data.tar.gz") && + !CheckMember("data.tar.bz2") && + !CheckMember("data.tar.lzma")) { + _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; } } @@ -130,6 +132,10 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream) Member = AR.FindMember("data.tar.bz2"); Compressor = "bzip2"; } + if (Member == 0) { + Member = AR.FindMember("data.tar.lzma"); + Compressor = "lzma"; + } if (Member == 0) return _error->Error(_("Internal error, could not locate member")); if (File.Seek(Member->Start) == false) -- cgit v1.2.3