summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/progress/gtk2.py9
-rw-r--r--debian/changelog7
2 files changed, 12 insertions, 4 deletions
diff --git a/apt/progress/gtk2.py b/apt/progress/gtk2.py
index 9137ef76..b5794e92 100644
--- a/apt/progress/gtk2.py
+++ b/apt/progress/gtk2.py
@@ -34,6 +34,7 @@ except ImportError:
import gobject as glib
import gobject
import pango
+import time
import vte
import apt_pkg
@@ -127,16 +128,15 @@ class GInstallProgress(gobject.GObject, base.InstallProgress):
self.apt_status = -1
self.time_last_update = time.time()
self.term = term
- reaper = vte.reaper_get()
- reaper.connect("child-exited", self.child_exited)
+ self.term.connect("child-exited", self.child_exited)
self.env = ["VTE_PTY_KEEP_FD=%s" % self.writefd,
"DEBIAN_FRONTEND=gnome",
"APT_LISTCHANGES_FRONTEND=gtk"]
self._context = glib.main_context_default()
- def child_exited(self, term, pid, status):
+ def child_exited(self, term):
"""Called when a child process exits"""
- self.apt_status = os.WEXITSTATUS(status)
+ self.apt_status = term.get_child_exit_status()
self.finished = True
def error(self, pkg, errormsg):
@@ -204,6 +204,7 @@ class GInstallProgress(gobject.GObject, base.InstallProgress):
"""Wait for the child process to exit."""
while not self.finished:
self.update_interface()
+ time.sleep(0.02)
return self.apt_status
if apt_pkg._COMPAT_0_7:
diff --git a/debian/changelog b/debian/changelog
index 906f86df..d7a4d46f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-apt (0.8.0ubuntu9) oneiric; urgency=low
+
+ * apt/progress/gtk2.py:
+ - update to the latest vte API for child-exited (LP: #865388)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 04 Oct 2011 16:35:52 +0200
+
python-apt (0.8.0ubuntu8) oneiric; urgency=low
* add concept of "ParentComponent" for e.g. ubuntu/multiverse