Dear maintainer,

I've prepared an NMU for kupfer (versioned as 0+v208-2.1). The diff
is attached to this message.

I've modified the original patch sligthly so that kupfer stays
compatible with the old and new keyring backend locations.

Regards
-- 
Sebastian Ramacher
diff -Nru kupfer-0+v208/debian/changelog kupfer-0+v208/debian/changelog
--- kupfer-0+v208/debian/changelog	2012-06-24 12:34:05.000000000 +0200
+++ kupfer-0+v208/debian/changelog	2013-12-05 21:04:56.000000000 +0100
@@ -1,3 +1,12 @@
+kupfer (0+v208-2.1) unstable; urgency=low
+
+  * Non-maintainer upload with maintainer approval.
+  * debian/patches/keyring-3.patch: python-keyring dropped support for
+    deprecated keyring.backend. Make kupfer compatible with the new backend
+    location. (Closes: #728468)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Thu, 05 Dec 2013 21:04:54 +0100
+
 kupfer (0+v208-2) unstable; urgency=low
 
   * debian/patches/uses_fragment.patch:
diff -Nru kupfer-0+v208/debian/patches/keyring-3.patch kupfer-0+v208/debian/patches/keyring-3.patch
--- kupfer-0+v208/debian/patches/keyring-3.patch	1970-01-01 01:00:00.000000000 +0100
+++ kupfer-0+v208/debian/patches/keyring-3.patch	2013-12-05 21:04:52.000000000 +0100
@@ -0,0 +1,50 @@
+Description: Adopt to new keyring backend locations
+ keyring.backend is deprecated since python-keyring 1.1 and has been replaced by
+ keyring.backends. The compatibility module has been dropped in python-keyring
+ 3.0 and thus kupfer needs to use keyring.backends. This is done by checking the
+ new location first and falling back to the old location on ImportError.
+Author: Sebastian Ramacher <sramac...@debian.org>
+Bug-Debian: http://bugs.debian.org/728468
+Last-Update: 2013-12-05
+
+--- a/kupfer/plugin_support.py
++++ b/kupfer/plugin_support.py
+@@ -166,11 +166,18 @@
+ 	@classmethod
+ 	def get_backend_name(cls):
+ 		import keyring.core
+-		import keyring.backend
++		try:
++			from keyring.backends.Gnome import Keyring as GnomeKeyring
++			from keyring.backends.kwallet import Keyring as KDEKWallet
++			from keyring.backends.file import PlaintextKeyring as UncryptedFileKeyring
++		except ImportError:
++			from keyring.backend import GnomeKeyring
++			from keyring.backend import KDEKWallet
++			from keyring.backend import UncryptedFileKeyring
+ 		keyring_map = {
+-				keyring.backend.GnomeKeyring : _("GNOME Keyring"),
+-				keyring.backend.KDEKWallet : _("KWallet"),
+-				keyring.backend.UncryptedFileKeyring: _("Unencrypted File"),
++				GnomeKeyring : _("GNOME Keyring"),
++				KDEKWallet : _("KWallet"),
++				UncryptedFileKeyring: _("Unencrypted File"),
+ 			}
+ 		kr = keyring.get_keyring()
+ 		keyring_name = keyring_map.get(type(kr), type(kr).__name__)
+@@ -209,10 +216,13 @@
+ 		raise
+ 	else:
+ 		# Configure the fallback keyring's configuration file if used
+-		import keyring.backend
+ 		kr = keyring.get_keyring()
+ 		if hasattr(kr, "crypted_password"):
+-			keyring.set_keyring(keyring.backend.UncryptedFileKeyring())
++			try:
++				from keyring.backends.file import PlaintextKeyring as UncryptedFileKeyring
++			except ImportError:
++				from keyring.backend import UncryptedFileKeyring
++			keyring.set_keyring(UncryptedFileKeyring())
+ 			kr = keyring.get_keyring()
+ 		if hasattr(kr, "file_path"):
+ 			kr.file_path = config.save_config_file("keyring.cfg")
diff -Nru kupfer-0+v208/debian/patches/series kupfer-0+v208/debian/patches/series
--- kupfer-0+v208/debian/patches/series	2012-06-24 12:33:52.000000000 +0200
+++ kupfer-0+v208/debian/patches/series	2013-12-03 19:14:16.000000000 +0100
@@ -1 +1,2 @@
 uses_fragment.patch
+keyring-3.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to