summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeViewGtk.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-04-25 19:10:07 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-04-25 19:10:07 +0200
commit6e64cd518909238ee6bb9c992c6dfd8e173fec47 (patch)
tree1156e332320afa7f3027832c70cca0c8d0fd638d /DistUpgrade/DistUpgradeViewGtk.py
parent9532aeb2dbdf40576b352b78d1907af82cd589c1 (diff)
downloadpython-apt-6e64cd518909238ee6bb9c992c6dfd8e173fec47.tar.gz
* DistUpgrade/DistUpgradeViewGtk.py:
- make sure dpkg --configure -a is run when something goes wrong
Diffstat (limited to 'DistUpgrade/DistUpgradeViewGtk.py')
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index 3236ba14..bf1fcbe8 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -253,9 +253,19 @@ class DistUpgradeVteTerminal(object):
self.term = term
self.parent = parent
def call(self, cmd):
+ def wait_for_child(widget):
+ #print "wait for child finished"
+ self.finished=True
self.term.show()
+ self.term.connect("child-exited", wait_for_child)
self.parent.expander_terminal.set_expanded(True)
self.term.fork_command(command=cmd[0],argv=cmd)
+ self.finished = False
+ while not self.finished:
+ while gtk.events_pending():
+ gtk.main_iteration()
+ time.sleep(0.1)
+ del self.finished
class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp):
" gtk frontend of the distUpgrade tool "
@@ -497,10 +507,10 @@ if __name__ == "__main__":
cache[pkg].markInstall()
cache.commit(fp,ip)
- sys.exit(0)
+ #sys.exit(0)
ip.conffile("TODO","TODO~")
view.getTerminal().call(["dpkg","--configure","-a"])
- view.getTerminal().call(["ls"])
+ view.getTerminal().call(["ls","-R","/usr"])
view.error("short","long",
"asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended\n"
"asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended\n"