Package: gdebi-kde
Version: 0.9.5.2
Severity: grave
Tags: l10n upstream patch
Justification: renders package unusable

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
Installed gdebi-kde and attempted to use it to install a package.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
1) Launching by double-clicking on a .deb file in Dolphin (KDE file explorer)

2) Launching from Terminal

   * What was the outcome of this action?
1) Busy-cursor for a short while then nothing.

2) Displayed errros related to deprecated API usage.  The first one was:
$ ./gdebi-kde
Traceback (most recent call last):
  File "./gdebi-kde", line 27, in <module>
    from PyKDE4.kdeui import KApplication, KMessageBox, ki18n
ImportError: cannot import name ki18n

   * What outcome did you expect instead?
gdebi-kde interface to be displayed to allow me to install a package.

*** End of the template - remove these template lines ***



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (700, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.4-1vaiott1-amd64+ (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdebi-kde depends on:
ii  gdebi-core      0.9.5.2
ii  kde-runtime     4:4.11.5-1
ii  kdesudo         3.4.2.4-2
ii  python3-pykde4  4:4.11.5-1+b1
pn  python3:any     <none>

Versions of packages gdebi-kde recommends:
ii  shared-mime-info  1.2-1

gdebi-kde suggests no packages.
Author: Michael Werle <mi...@michaelwerle.com>
Description: Fix python3 internatlization bugs

* gdebi-kde: Fix ki18n import: from kdeui to kdecore
* gdebi-kde: Replace ugettext with gettext
* gdebi-kde: Pass bytes rather than strings to ki18n
Index: gdebi-0.9.5.2/gdebi-kde
===================================================================
--- gdebi-0.9.5.2.orig/gdebi-kde	2014-04-05 18:40:31.351044161 +0100
+++ gdebi-0.9.5.2/gdebi-kde	2014-04-05 18:40:56.091105029 +0100
@@ -23,8 +23,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import sys
-from PyKDE4.kdecore import KCmdLineArgs, KAboutData, KCmdLineOptions
-from PyKDE4.kdeui import KApplication, KMessageBox, ki18n
+from PyKDE4.kdecore import KCmdLineArgs, KAboutData, KCmdLineOptions, ki18n
+from PyKDE4.kdeui import KApplication, KMessageBox
 
 from optparse import OptionParser
 from GDebi.GDebiKDE import GDebiKDE
@@ -42,7 +42,7 @@
     gettext.bindtextdomain(localesApp, localesDir)
     gettext.textdomain(localesApp)
     t = gettext.translation(localesApp, localesDir, fallback=True)
-    _ = t.ugettext
+    _ = t.gettext
     data="/usr/share/gdebi"
 
 
@@ -57,12 +57,12 @@
         #Don't edit from this point
         appName     = "gdebi-kde"
         catalog     = ""
-        programName = ki18n ("GDebi")
+        programName = ki18n (bytes("GDebi", 'utf-8'))
         version     = "1.0"
-        description = ki18n (".deb Package Installer")
+        description = ki18n (bytes(".deb Package Installer", 'utf-8'))
         license     = KAboutData.License_GPL
-        copyright   = ki18n ("(c) 2005-2007 Martin Böhm, 2008 Canonical Ltd")
-        text        = ki18n ("none")
+        copyright   = ki18n (bytes("(c) 2005-2007 Martin Böhm, 2008 Canonical Ltd", 'utf-8'))
+        text        = ki18n (bytes("none", 'utf-8'))
         homePage    = "launchpad.net/gdebi"
         bugEmail    = ""
 
@@ -75,8 +75,8 @@
         # bug #190907
         opts = KCmdLineOptions()
         opts.add("n")
-        opts.add("dont-interactive", ki18n("Run non-interactive (dangerous!)"))
-        opts.add("+[File]", ki18n("File to open"))
+        opts.add("dont-interactive", ki18n(bytes("Run non-interactive (dangerous!)", 'utf-8')))
+        opts.add("+[File]", ki18n(bytes("File to open", 'utf-8')))
         KCmdLineArgs.addCmdLineOptions(opts)
 
         app = KApplication()
Author: Michael Werle <mi...@michaelwerle.com>
Description: Remove deprecated QStringList

* GDebi/GDebiKDE.py: replace QStringList with list
--- a/GDebi/GDebiKDE.py
+++ b/GDebi/GDebiKDE.py
@@ -37,7 +37,6 @@
 from PyQt4.QtCore import (
     Qt,
     SIGNAL,
-    QStringList,
     QTimer,
     )
 from PyQt4.QtGui import (
@@ -307,7 +306,7 @@
         self.close()
 
     def detailsButtonClicked(self):
-        changedList = QStringList()
+        changedList = list()
         (install, remove, unauthenticated) = self._deb.required_changes
         for i in install:
             changedList.append(_("To be installed: %s") % i)
Author: Michael Werle <mi...@michaelwerle.com>
Description: Fix deprecated usage of string class

* GDebi/GDebiKDE.py: replace string operations with str
--- a/GDebi/GDebiKDE.py
+++ b/GDebi/GDebiKDE.py
@@ -24,7 +24,6 @@
 import logging
 import os
 import re
-import string
 import sys
 
 
@@ -210,13 +209,13 @@
         buf = self.DecriptionEdit
         try:
             long_desc = ""
-            raw_desc = string.split(utf8(self._deb["Description"]), "\n")
+            raw_desc = str.splitlines(utf8(self._deb["Description"]))
             # append a newline to the summary in the first line
             summary = raw_desc[0]
             raw_desc[0] = ""
             long_desc = "%s\n" % summary
             for line in raw_desc:
-                tmp = string.strip(line)
+                tmp = str.strip(line)
                 if tmp == ".":
                     long_desc += "\n"
                 else:

Reply via email to