summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/debfile.py37
-rw-r--r--debian/changelog4
-rw-r--r--debian/control1
3 files changed, 24 insertions, 18 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index ab24c50b..6a189502 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -40,8 +40,12 @@ class DebPackage(object):
VERSION_SAME,
VERSION_NEWER) = range(4)
- _supported_data_members = ("data.tar.gz", "data.tar.bz2", "data.tar.lzma",
- "data.tar.xz")
+ _supported_data_members = (
+ "data.tar.gz",
+ "data.tar.bz2",
+ "data.tar.lzma",
+ "data.tar.xz",
+ )
debug = 0
@@ -82,10 +86,22 @@ class DebPackage(object):
try:
self._debfile.data.go(lambda item, data: files.append(item.name))
except SystemError:
- return [_("List of files for '%s' could not be read" %
- self.filename)]
+ return [_("List of files for '%s' could not be read") %
+ self.filename]
return files
+ @property
+ def control_filelist(self):
+ """ return the list of files in control.tar.gt """
+ control = []
+ try:
+ self._debfile.control.go(lambda item, data: control.append(item.name))
+ except SystemError:
+ return [_("List of control files for '%s' could not be read") %
+ self.filename]
+ return sorted(control)
+
+
# helper that will return a pkgname with a multiarch suffix if needed
def _maybe_append_multiarch_suffix(self, pkgname,
in_conflict_checking=False):
@@ -545,19 +561,6 @@ class DebPackage(object):
remove.append(pkg.name)
return (install, remove, unauthenticated)
- @property
- def control_filelist(self):
- """ return the list of files in control.tar.gt """
- try:
- from debian.debfile import DebFile
- except:
- raise Exception(_("Python-debian module not available"))
- content = []
- for name in DebFile(self.filename).control:
- if name and name != ".":
- content.append(name)
- return sorted(content)
-
@staticmethod
def to_hex(in_data):
hex = ""
diff --git a/debian/changelog b/debian/changelog
index 1e400dfb..17fe379e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ python-apt (0.8.4) UNRELEASED; urgency=low
* doc/examples/build-deps.py:
- update the build-deps.py example to use the apt API more
* add support for apt_pkg.Policy.get_priority(PkgFileIterator)
+ * apt/debfile.py:
+ - use apt_inst for reading the control_filelist
+ * debian/control:
+ - remove no longer needed dependency on python-debian
-- Michael Vogt <michael.vogt@ubuntu.com> Wed, 04 Jan 2012 12:07:48 +0100
diff --git a/debian/control b/debian/control
index 541e4c36..29392858 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,6 @@ Breaks: packagekit-backend-apt (<= 0.4.8-0ubuntu4),
computer-janitor (<< 1.14.1-1+),
debdelta (<< 0.41+),
python-dogtail (<< 0.6.1-3.1+),
- python-debian (<< 0.1.18+),
python-software-properties (<< 0.70.debian-1+),
aptdaemon (<< 0.11+bzr343-1~),
apt-forktracer (<< 0.3),