summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-12 19:36:08 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-12 19:36:08 +0200
commit9a968fbe949fc6f13a8a7074197156f3682b7682 (patch)
tree42f20c7db17970a97cac85c1c5aeeee1f6ab9e44
parent395b33f9f8e93223f933c625bacbf1e2d23c6673 (diff)
parent81a030505cb46a35f670150929fad5862cd12767 (diff)
downloadpython-apt-9a968fbe949fc6f13a8a7074197156f3682b7682.tar.gz
apt/progress.py: Extract the package name from the status message (Closes: #532660)
-rw-r--r--apt/progress/__init__.py11
-rw-r--r--debian/changelog5
2 files changed, 12 insertions, 4 deletions
diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py
index 47d2a861..a6287dc4 100644
--- a/apt/progress/__init__.py
+++ b/apt/progress/__init__.py
@@ -367,13 +367,15 @@ class DpkgInstallProgress(InstallProgress):
def run(self, debfile):
"""Start installing the given Debian package."""
- self.debfile = debfile
- self.debname = os.path.basename(debfile).split("_")[0]
+ if apt_pkg._COMPAT_0_7: # Deprecated stuff
+ self.debfile = debfile
+ self.debname = os.path.basename(debfile).split("_")[0]
+
pid = self.fork()
if pid == 0:
# child
res = os.system("/usr/bin/dpkg --status-fd %s -i %s" % \
- (self.writefd, self.debfile))
+ (self.writefd, debfile))
os._exit(os.WEXITSTATUS(res))
self.child_pid = pid
res = self.wait_child()
@@ -399,10 +401,11 @@ class DpkgInstallProgress(InstallProgress):
print "got garbage from dpkg: '%s'" % self.read
self.read = ""
break
+ pkg_name = statusl[1].strip()
status = statusl[2].strip()
#print status
if status == "error":
- self.error(self.debname, status)
+ self.error(pkg_name, status)
elif status == "conffile-prompt":
# we get a string like this:
# 'current-conffile' 'new-conffile' useredited distedited
diff --git a/debian/changelog b/debian/changelog
index 9f9838c3..7e79e89c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,15 @@
python-apt (0.7.92) UNRELEASED; urgency=low
+ [ Julian Andres Klode ]
* Add apt_pkg.HashString and apt_pkg.IndexRecords (Closes: #456141)
* Add apt_pkg.Policy class (Closes: #382725)
* Allow types providing __new__() to be subclassed.
* Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149)
+ [ Sebastian Heinlein ]
+ * apt/progress.py: Extract the package name from the status message
+ (Closes: #532660)
+
-- Julian Andres Klode <jak@debian.org> Fri, 12 Jun 2009 18:42:02 +0200
python-apt (0.7.91) experimental; urgency=low