summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--debian/control2
-rw-r--r--python/tar.cc9
3 files changed, 13 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 3360328e..f6aecd9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-apt (0.5.32) unstable; urgency=low
+
+ * Update to work with apt 0.5.32 (bzip2 deb support)
+
+ -- Matt Zimmerman <mdz@debian.org> Sun, 12 Dec 2004 09:44:45 -0800
+
python-apt (0.5.10) unstable; urgency=low
* Recompile with apt 0.5
diff --git a/debian/control b/debian/control
index e57dcf89..308bc488 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Matt Zimmerman <mdz@debian.org>
Standards-Version: 3.1.1
-Build-Depends: debhelper, libapt-pkg-dev (>= 0.5.5), apt-utils, python-dev (>= 2.3)
+Build-Depends: debhelper, libapt-pkg-dev (>= 0.5.32), apt-utils, python-dev (>= 2.3)
Package: python-apt
Architecture: any
diff --git a/python/tar.cc b/python/tar.cc
index f1dd7c31..38844a75 100644
--- a/python/tar.cc
+++ b/python/tar.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tar.cc,v 1.3 2002/02/07 03:35:26 jgg Exp $
+// $Id: tar.cc,v 1.4 2004/12/12 17:55:54 mdz Exp $
/* ######################################################################
Tar Inteface
@@ -110,7 +110,7 @@ PyObject *tarExtract(PyObject *Self,PyObject *Args)
{
// Open the file and associate the tar
FileFd Fd(fileno(PyFile_AsFile(File)),false);
- ExtractTar Tar(Fd,0xFFFFFFFF);
+ ExtractTar Tar(Fd,0xFFFFFFFF,Comp);
if (_error->PendingError() == true)
return HandleErrors();
@@ -137,6 +137,7 @@ PyObject *debExtract(PyObject *Self,PyObject *Args)
PyObject *File;
PyObject *Function;
char *Chunk;
+ const char *Comp = "gzip";
if (PyArg_ParseTuple(Args,"O!Os",&PyFile_Type,&File,
&Function,&Chunk) == 0)
@@ -165,7 +166,9 @@ PyObject *debExtract(PyObject *Self,PyObject *Args)
}
// Extract it.
- ExtractTar Tar(Deb.GetFile(),Member->Size);
+ if (strcmp(".bz2", &Chunk[strlen(Chunk)-4]) == 0)
+ Comp = "bzip2";
+ ExtractTar Tar(Deb.GetFile(),Member->Size,Comp);
ProcessTar Proc(Function);
if (Tar.Go(Proc) == false)
return HandleErrors();