=== modified file 'GDebi/GDebi.py'
--- GDebi/GDebi.py 2012-02-29 21:14:48 +0000
+++ GDebi/GDebi.py 2012-10-11 18:51:35 +0000
@@ -102,10 +102,6 @@
self.context=self.statusbar_main.get_context_id("context_main_window")
self.statusbar_main.push(self.context,_("Loading..."))
- self.window_main.set_sensitive(False)
- self.notebook_details.set_sensitive(False)
- self.hbox_main.set_sensitive(False)
-
# show what we have
self.window_main.realize()
self.window_main.show()
@@ -157,7 +153,7 @@
self.window_main.set_sensitive(True)
- def gio_progress_callback(self, bytes_read, bytes_total):
+ def gio_progress_callback(self, bytes_read, bytes_total, data):
self.progressbar_download.set_fraction(bytes_read/float(bytes_total))
while Gtk.events_pending():
Gtk.main_iteration()
@@ -179,7 +175,7 @@
sys.exit(1)
# Download the file
temp_file_name = os.path.join(tempfile.mkdtemp(),os.path.basename(file))
- gio_dest = Gio.File(temp_file_name)
+ gio_dest = Gio.file_new_for_path(temp_file_name)
try:
# download
gio_cancellable = Gio.Cancellable()
@@ -187,8 +183,8 @@
self.dialog_gio_download.set_transient_for(self.window_main)
self.dialog_gio_download.show()
self.label_action.set_text(_("Downloading package"))
- if gio_file.copy(gio_dest, self.gio_progress_callback, 0,
- gio_cancellable):
+ if gio_file.copy(gio_dest, 0, gio_cancellable,
+ self.gio_progress_callback, 0):
file = gio_dest.get_path()
self.dialog_gio_download.hide()
except Exception, e:
=== modified file 'GDebi/GDebiCli.py'
--- GDebi/GDebiCli.py 2011-09-12 21:50:39 +0000
+++ GDebi/GDebiCli.py 2012-10-11 18:56:49 +0000
@@ -77,7 +77,7 @@
else:
sys.stderr.write(_("Unknown package type '%s', exiting\n") % file)
sys.exit(1)
- except (IOError,SystemError),e:
+ except (IOError,SystemError,ValueError),e:
sys.stderr.write(_("Failed to open the software package\n"))
sys.stderr.write(_("The package might be corrupted or you are not "
"allowed to open the file. Check the permissions "
@@ -124,10 +124,10 @@
res = self._cache.commit(fprogress,iprogress)
except apt.cache.FetchFailedException, e:
sys.stderr.write(_("Error during install: '%s'") % e)
- return False
+ return 1
except SystemError, e:
sys.stderr.write(_("Error during install: '%s'") % e)
- return False
+ return 1
# install the package itself
if self._deb.filename.endswith(".dsc"):
@@ -139,12 +139,9 @@
#os.system("cd %s && dpkg-buildpackage -b -uc" % dir)
#for i in self._deb.binaries:
# os.system("gdebi %s_%s_*.deb" % (i,self._deb["Version"]))
- pass
+ return 0
else:
- ret = call(["dpkg","--auto-deconfigure", "-i",self._deb.filename])
- if (ret != 0):
- return False
- return True
+ return call(["dpkg","--auto-deconfigure", "-i",self._deb.filename])
if __name__ == "__main__":
@@ -160,4 +157,4 @@
except IndexError:
c = "y"
if res.lower().startswith(c):
- app.install()
+ sys.exit(app.install())
=== modified file 'GDebi/GDebiCommon.py'
--- GDebi/GDebiCommon.py 2011-09-04 10:23:03 +0000
+++ GDebi/GDebiCommon.py 2012-10-11 18:50:55 +0000
@@ -78,7 +78,7 @@
file = os.path.abspath(file)
try:
self._deb = DebPackage(file, self._cache, downloaded)
- except (IOError,SystemError),e:
+ except (IOError,SystemError,ValueError),e:
mimetype=guess_type(file)
if (mimetype[0] != None and
mimetype[0] != "application/x-debian-package"):
=== modified file 'GDebi/GDebiKDE.py'
--- GDebi/GDebiKDE.py 2012-01-25 22:21:31 +0000
+++ GDebi/GDebiKDE.py 2012-10-11 18:50:55 +0000
@@ -44,13 +44,6 @@
from GDebiCommon import GDebiCommon, utf8, _
from KDEAptDialogs import *
-# HACK - Ubuntu specific configuration
-try:
- import lsb_release
- UBUNTU = lsb_release.get_distro_information()['ID'] == 'Ubuntu'
-except Exception, e:
- UBUNTU=False
-
def __(catalog,str):
return unicode(gettext.dgettext(catalog, str), 'UTF-8')
@@ -310,9 +303,8 @@
else:
executable = "/usr/bin/gdebi-kde"
print "executable " + executable
- if UBUNTU:
- su_cmd = "/usr/bin/kdesudo"
- else:
+ su_cmd = "/usr/bin/kdesudo"
+ if not os.access(su_cmd, os.X_OK):
su_cmd = "/usr/lib/kde4/libexec/kdesu"
os.execl(su_cmd, os.path.basename(su_cmd), executable, "-n", self._deb.filename)
self.kapp.exit()
=== modified file 'data/gdebi.ui'
--- data/gdebi.ui 2011-09-02 20:14:25 +0000
+++ data/gdebi.ui 2012-10-11 18:50:55 +0000
@@ -737,7 +737,8 @@
0
<b><big> </big></b>
True
- True
+ False
+ True
1
@@ -757,7 +758,8 @@
0
0
True
- True
+ False
+ True
True
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-29 21:46:15 +0000
+++ debian/changelog 2012-10-11 18:51:35 +0000
@@ -1,3 +1,25 @@
+gdebi (0.8.6) UNRELEASED; urgency=low
+
+ * gdebi, GDebi/GDebiCli.py:
+ - Return dpkg error code (LP: #1033631).
+ * gdebi-gtk, gdebi-kde:
+ - Convert help options with unicode (LP: #976253).
+ * GDebi/GDebi.py:
+ - Port to new GIO API (LP: #858700).
+ * GDebi/GDebi.py, data/gdebi.ui:
+ - Mark menu and labels as sensitive at startup (LP: #1000014).
+ * GDebi/GDebiCli.py, GDebi/GDebiCommon.py:
+ - Also handle ValueError exception (LP: #980457).
+ * GDebi/GDebiKDE.py:
+ - Fall-back on kdesu if kdesudo is not avaliable (LP: #949869).
+ * debian/control:
+ - Add xz-utils to gdebi-core Suggests field (Closes: #685193).
+ * po/pt.po:
+ - Fix translation string which erroneously used three format string
+ parameters instead of two (LP: #964895).
+
+ -- Luca Falavigna Thu, 13 Sep 2012 23:30:32 +0200
+
gdebi (0.8.5) unstable; urgency=low
* GDebi/GDebi.py:
=== modified file 'debian/control'
--- debian/control 2012-02-29 21:28:19 +0000
+++ debian/control 2012-10-11 18:50:55 +0000
@@ -17,7 +17,7 @@
${misc:Depends},
python-apt (>= 0.7.97),
python-debian (>= 0.1.15)
-Suggests: xz-lzma
+Suggests: xz-utils | xz-lzma
Description: simple tool to install deb files
gdebi lets you install local deb packages resolving and installing
its dependencies. apt does the same, but only for remote (http, ftp)
=== modified file 'gdebi'
--- gdebi 2011-09-12 21:50:39 +0000
+++ gdebi 2012-10-11 18:50:55 +0000
@@ -94,8 +94,7 @@
if os.getuid() != 0:
print _("Need to be root to install packages")
sys.exit(1)
- debi.install()
- sys.exit(0)
+ sys.exit(debi.install())
# show information
debi.show_dependencies()
@@ -113,4 +112,4 @@
except IndexError:
c = "y"
if res.lower().startswith(c):
- debi.install()
+ sys.exit(debi.install())
=== modified file 'gdebi-gtk'
--- gdebi-gtk 2011-09-02 20:14:25 +0000
+++ gdebi-gtk 2012-10-11 18:50:55 +0000
@@ -48,15 +48,15 @@
parser.add_option("-n", "--non-interactive",
action="store_true", dest="non_interactive",
default=False,
- help=_("Run non-interactive (dangerous!)"))
+ help=unicode(_("Run non-interactive (dangerous!)"),"UTF-8"))
parser.add_option("--auto-close", "",
action="store_true", default=False,
- help=_("Auto close when the install is finished"))
+ help=unicode(_("Auto close when the install is finished"),"UTF-8"))
parser.add_option("--datadir", "", default="",
- help=_("Use alternative datadir"))
+ help=unicode(_("Use alternative datadir"),"UTF_8"))
parser.add_option("-r", "--remove", default="False",
action="store_true", dest="remove",
- help=_("Remove package"))
+ help=unicode(_("Remove package"),"UTF-8"))
(options, args) = parser.parse_args()
if options.datadir:
=== modified file 'gdebi-kde'
--- gdebi-kde 2009-03-05 09:55:21 +0000
+++ gdebi-kde 2012-10-11 18:50:55 +0000
@@ -64,7 +64,7 @@
parser.add_option("-n", "--non-interactive",
action="store_true", dest="non_interactive",
default=False,
- help=_("Run non-interactive (dangerous!)"))
+ help=unicode(_("Run non-interactive (dangerous!)"),"UTF-8"))
(options, args) = parser.parse_args()
try:
=== modified file 'po/pt.po'
--- po/pt.po 2012-02-29 21:36:13 +0000
+++ po/pt.po 2012-10-11 18:50:55 +0000
@@ -490,7 +490,7 @@
#: ../GDebi/GDebi.py:986 ../GDebi/KDEAptDialogs.py:219
#, python-format
msgid "File %s of %s"
-msgstr "Ficheiro %s de %s a %s/s"
+msgstr "Ficheiro %s de %s"
#. print "mediaChange %s %s" % (medium, drive)
#: ../GDebi/GDebi.py:993 ../GDebi/KDEAptDialogs.py:224