X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b3d44315ee812ba2d0a99751695b5a4314407ec2..b43b5a7d67cdf706afbb30ff470f1a8d7d810986:/apt-inst/deb/debfile.cc diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index fe2130677..cd7a88808 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -16,10 +16,6 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/debfile.h" -#endif - #include #include #include @@ -48,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; } } @@ -134,8 +132,12 @@ 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")); + return _error->Error(_("Internal error, could not locate member")); if (File.Seek(Member->Start) == false) return false; @@ -253,7 +255,7 @@ bool debDebFile::MemControlExtract::Read(debDebFile &Deb) Control[Length] = '\n'; Control[Length+1] = '\n'; if (Section.Scan(Control,Length+2) == false) - return _error->Error(_("Unparsible control file")); + return _error->Error(_("Unparsable control file")); return true; } /*}}}*/