summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/__init__.py11
1 files changed, 7 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