]> git.saurik.com Git - apt.git/commitdiff
* Applied patch from Guillem Jover <guillem.jover@nokia.com> to add
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 28 Jul 2007 15:25:01 +0000 (12:25 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Sat, 28 Jul 2007 15:25:01 +0000 (12:25 -0300)
  support to add lzma support (closes: #408201)

apt-inst/deb/debfile.cc
apt-pkg/deb/debsrcrecords.cc
debian/changelog

index 9d83120f895c9f975e864f10018e12b80b7ca11e..cd7a888081f1155fd4a4429f7ce37dacf24f92ff 100644 (file)
@@ -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)
index fcd9bb9018f3f9d9fd42d75be973aa46a6b73b8f..ace4e00b58560295700d8c82470fcb7f77c1f1bd 100644 (file)
@@ -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;
index 8961a0257386417892408474bfc89abf2506f33e..7f8d8f0dd0154ec7ce95895e83560f9bd490629b 100644 (file)
@@ -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: