summaryrefslogtreecommitdiff
path: root/apt-inst
diff options
context:
space:
mode:
authorPeter Karlsson <peterk@debian.org>2007-10-08 11:44:54 +0100
committerPeter Karlsson <peterk@debian.org>2007-10-08 11:44:54 +0100
commit21231056c2f4fb82730c0ac7e7f90456668cae38 (patch)
tree1f9ca6a27065dce5014adea7095596ec6a8cb744 /apt-inst
parent28b68bf4207be80d4549579f34262f1248a2e528 (diff)
parent24401c09f0a826ec0074f46dfe70efe3aaf79f25 (diff)
Merge upstream.
Diffstat (limited to 'apt-inst')
-rw-r--r--apt-inst/contrib/extracttar.cc2
-rw-r--r--apt-inst/deb/debfile.cc10
-rw-r--r--apt-inst/filelist.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 8a535967f..68c871a5d 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -332,7 +332,7 @@ bool ExtractTar::Go(pkgDirStream &Stream)
}
// And finish up
- if (Itm.Size != 0 && BadRecord == false)
+ if (Itm.Size >= 0 && BadRecord == false)
if (Stream.FinishedFile(Itm,Fd) == false)
return false;
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)
diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h
index 86766254f..c74a310e4 100644
--- a/apt-inst/filelist.h
+++ b/apt-inst/filelist.h
@@ -29,7 +29,7 @@
#define PKGLIB_FILELIST_H
-
+#include <cstring>
#include <apt-pkg/mmap.h>
class pkgFLCache