Package: gdebi-kde
Version: 0.9
Severity: important
Tags: patch
Dear Maintainer,
When I try to install a package that needs to bring in dependencies I run into
two annoying bugs:
* gdebi-kde pops up a window with 'Installing' as its title but that window
remains desperately blank. Still the download and install appears to progress
in the background.
* However if a package needs to ask a question (typically about configuration
file upgrades), then everything is stuck since there is no way to access the
'console' to provide answers. Remember, the 'Installing' window is blank so
there is no way to click on 'Show Details'. This is the reason I marked this
bug as important: questions are frequent and gdebi-kde cannot deal with them.
The good news is that I have a patch to fix both issues. Apparently
KDEAptDialogs.py has been a bit neglected and did not keep up with
apt/progress/base.py.
Specifically:
* AcquireProgress.pulse() now takes two parameters.
-> This fixes the blank windows.
* The AcquireProgress properties have been renamed to all lowercase with an
underscore.
-> This fixes the progress during the package downloads.
* The InstallProgress methods have been renamed to all lowercase with an
underscore.
-> This makes the window responsive again during the packages installation.
So questions can be answered.
* "Foo: " % var always returns 'Foo: '. The trailing '%s' cannot be omitted.
-> Users won't care about this but developers may welcome more seeing the
debug messages as intended.
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- GDebi/KDEAptDialogs.py.orig 2013-06-14 02:23:40.885207148 +0200
+++ GDebi/KDEAptDialogs.py 2013-06-14 02:46:44.761418749 +0200
@@ -133,20 +133,20 @@ class KDEInstallProgressAdapter(InstallP
#self.term_expander.set_expanded(True) #FIXME show konsole
pass
- def startUpdate(self):
+ def start_update(self):
apt_pkg.pkgsystem_unlock()
self.action.setText(_("Installing dependencies..."))
self.progress.setValue(0)
- def statusChange(self, pkg, percent, status):
+ def status_change(self, pkg, percent, status):
self.progress.setValue(percent)
#print status # mhb debug
#self.progress.setText(status) #FIXME set text
- def updateInterface(self):
+ def update_interface(self):
# run the base class
try:
- InstallProgress.updateInterface(self)
+ InstallProgress.update_interface(self)
except ValueError as e:
pass
# log the output of dpkg (on the master_fd) to the DumbTerminal
@@ -161,7 +161,7 @@ class KDEInstallProgressAdapter(InstallP
# nothing happend within the timeout, break
break
except Exception as e:
- logging.debug("updateInterface: " % e)
+ logging.debug("update_interface: %s" % e)
break
KApplication.kApplication().processEvents()
@@ -175,14 +175,14 @@ class KDEInstallProgressAdapter(InstallP
os.environ["APT_LISTCHANGES_FRONTEND"] = "none"
return self.child_pid
- def waitChild(self):
+ def wait_child(self):
while True:
try:
select.select([self.statusfd],[],[], self.select_timeout)
except Exception as e:
- logging.debug("waitChild: " % e)
+ logging.debug("wait_child: %s" % e)
pass
- self.updateInterface()
+ self.update_interface()
(pid, res) = os.waitpid(self.child_pid,os.WNOHANG)
if pid == self.child_pid:
#print "child exited: ", pid, os.WEXITSTATUS(res)
@@ -204,16 +204,14 @@ class KDEFetchProgressAdapter(apt.progre
def stop(self):
pass
- def pulse(self):
- super(KDEFetchProgressAdapter, self).pulse()
- self.progress.setValue(self.percent)
- currentItem = self.currentItems + 1
- if currentItem > self.totalItems:
- currentItem = self.totalItems
- if self.currentCPS > 0:
- self.label.setText(_("Downloading additional package files...") + _("File %s of %s at %sB/s" % (self.currentItems,self.totalItems,apt_pkg.size_to_str(self.currentCPS))))
+ def pulse(self, owner):
+ super(KDEFetchProgressAdapter, self).pulse(owner)
+ at_item = min(self.current_items + 1, self.total_items)
+ if self.current_cps > 0:
+ self.label.setText(_("Downloading additional package files...") + _("File %s of %s at %sB/s" % (at_item, self.total_items, apt_pkg.size_to_str(self.current_cps))))
else:
- self.label.setText(_("Downloading additional package files...") + _("File %s of %s" % (self.currentItems,self.totalItems)))
+ self.label.setText(_("Downloading additional package files...") + _("File %s of %s" % (at_item, self.total_items)))
+ self.progress.setValue(100 * self.current_bytes / self.total_bytes)
KApplication.kApplication().processEvents()
return True