X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/90a88b83020eb9526951eec83e3075b54653fa33..bc33e0f0b6b1fdb010dcd4a49a78b827530052aa:/apt-inst/deb/debfile.cc?ds=sidebyside diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 9d83120f8..edd78adbb 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -44,8 +44,12 @@ 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") && + !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; } } @@ -130,6 +134,14 @@ 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) { + 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)