[Pkg-libvirt-maintainers] Bug#697864: Update virinst via wheezy-proposed-updates

Guido Günther agx at sigxcpu.org
Tue Jan 15 16:18:36 UTC 2013


Hi,
the tools from virtinst will fail to do anything useful with a bad
locale sitting. The patch is simple and cherry-picked from upstream.
Would this be a case to be fixed via w-p-u? Sid already has a newer
upstream version. Debdiff is attached.
Cheers,
 -- Guido


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
diff -Nru virtinst-0.600.1/debian/changelog virtinst-0.600.1/debian/changelog
--- virtinst-0.600.1/debian/changelog	2012-04-16 14:24:13.000000000 +0200
+++ virtinst-0.600.1/debian/changelog	2013-01-15 17:06:42.000000000 +0100
@@ -1,3 +1,10 @@
+virtinst (0.600.1-3) wheezy-proposed-updates; urgency=low
+
+  * [3723835] Don't fail if we can't set locale (debian bug #697864)
+    Thanks to Cole Robinson (Closes: #697864)
+
+ -- Guido G?nther <agx at sigxcpu.org>  Tue, 15 Jan 2013 17:06:27 +0100
+
 virtinst (0.600.1-2) unstable; urgency=low
 
   * [5e59401] Fix location of Debian daily builds.
diff -Nru virtinst-0.600.1/debian/patches/0005-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch virtinst-0.600.1/debian/patches/0005-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch
--- virtinst-0.600.1/debian/patches/0005-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch	1970-01-01 01:00:00.000000000 +0100
+++ virtinst-0.600.1/debian/patches/0005-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch	2013-01-15 16:20:37.000000000 +0100
@@ -0,0 +1,27 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Mon, 14 Jan 2013 15:06:14 -0500
+Subject: Don't fail if we can't set locale (debian bug #697864)
+
+---
+ virtinst/cli.py |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/virtinst/cli.py b/virtinst/cli.py
+index 80e1fcf..e739b12 100644
+--- a/virtinst/cli.py
++++ b/virtinst/cli.py
+@@ -144,7 +144,13 @@ def setupParser(usage=None):
+     return parser
+ 
+ def setupGettext():
+-    locale.setlocale(locale.LC_ALL, '')
++    try:
++        locale.setlocale(locale.LC_ALL, '')
++    except locale.Error, e:
++        print >> sys.stderr, "warning: failed to set locale, defaulting to C"
++        os.environ['LC_ALL'] = 'C'
++        locale.setlocale(locale.LC_ALL, 'C')
++
+     gettext.bindtextdomain("virtinst")
+     gettext.install("virtinst")
+ 
diff -Nru virtinst-0.600.1/debian/patches/series virtinst-0.600.1/debian/patches/series
--- virtinst-0.600.1/debian/patches/series	2012-04-16 14:23:13.000000000 +0200
+++ virtinst-0.600.1/debian/patches/series	2013-01-15 16:20:37.000000000 +0100
@@ -2,3 +2,4 @@
 0002-Fix-path-to-pygrub.patch
 0003-Fix-path-to-keyboard-configuration.patch
 0004-Fix-location-of-Debian-daily-builds.patch
+0005-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch


More information about the Pkg-libvirt-maintainers mailing list