summaryrefslogtreecommitdiff
path: root/apt/progress/__init__.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-30 14:36:35 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-30 14:36:35 +0200
commit2b64e774ba825789caea80d9424faf1ac3be19d9 (patch)
treed9020c831e98ddba677ee7d3626c321bb4c92389 /apt/progress/__init__.py
parenteadd9977838ee990a06d5f5702313f81c824d51d (diff)
downloadpython-apt-2b64e774ba825789caea80d9424faf1ac3be19d9.tar.gz
apt/progress.py: Extract the package name from the status message
(Closes: #532660)
Diffstat (limited to 'apt/progress/__init__.py')
-rw-r--r--apt/progress/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py
index b582ad22..b9288c2c 100644
--- a/apt/progress/__init__.py
+++ b/apt/progress/__init__.py
@@ -344,7 +344,7 @@ class DpkgInstallProgress(InstallProgress):
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.waitChild()
@@ -370,10 +370,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