Browse Source

* Applied patch from Guillem Jover <guillem.jover@nokia.com> to add

support to add lzma support (closes: #408201)
debian/1.8.y
Otavio Salvador 15 years ago
parent
commit
ac005224d0
  1. 10
      apt-inst/deb/debfile.cc
  2. 2
      apt-pkg/deb/debsrcrecords.cc
  3. 2
      debian/changelog

10
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)

2
apt-pkg/deb/debsrcrecords.cc

@ -137,7 +137,7 @@ bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List)
break;
F.Type = string(F.Path,Tmp+1,Pos-Tmp);
if (F.Type == "gz" || F.Type == "bz2")
if (F.Type == "gz" || F.Type == "bz2" || F.Type == "lzma")
{
Pos = Tmp-1;
continue;

2
debian/changelog

@ -3,6 +3,8 @@ apt (0.7.5) UNRELEASED; urgency=low
[ Otavio Salvador ]
* Applied patch from Guillem Jover <guillem.jover@nokia.com> to use
dpkg-architecture to get the host architecture (closes: #407187)
* Applied patch from Guillem Jover <guillem.jover@nokia.com> to add
support to add lzma support (closes: #408201)
[ Michael Vogt ]
* apt-pkg/depcache.cc:

Loading…
Cancel
Save