Your message dated Wed, 08 Aug 2012 10:57:08 +0200
with message-id <[email protected]>
and subject line Re: Bug#684020: unblock: germinate/2.10
has caused the Debian Bug report #684020,
regarding unblock: germinate/2.10
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
684020: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684020
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock

germinate 2.10 fixes a failure when running in the C locale, which is a
regression from the Python 2-based version in squeeze.  The fix is
unit-tested and confirmed to work in Ubuntu.  The diff follows.

  https://bugs.launchpad.net/ubuntu/+source/germinate/+bug/1025818

unblock germinate/2.10

diff -Nru germinate-2.9/debian/changelog germinate-2.10/debian/changelog
--- germinate-2.9/debian/changelog      2012-06-14 15:30:06.000000000 +0100
+++ germinate-2.10/debian/changelog     2012-07-23 11:33:46.000000000 +0100
@@ -1,3 +1,10 @@
+germinate (2.10) unstable; urgency=low
+
+  * Always open Packages files as UTF-8, regardless of the current locale.
+    LP: #1025818.
+
+ -- Steve Langasek <[email protected]>  Mon, 23 Jul 2012 11:33:43 +0100
+
 germinate (2.9) unstable; urgency=low
 
   * Support both Python 2 and 3 directly rather than using 2to3.
diff -Nru germinate-2.9/germinate/archive.py germinate-2.10/germinate/archive.py
--- germinate-2.9/germinate/archive.py  2012-06-14 15:15:41.000000000 +0100
+++ germinate-2.10/germinate/archive.py 2012-07-23 11:33:03.000000000 +0100
@@ -33,6 +33,8 @@
 import tempfile
 import shutil
 import logging
+import codecs
+import io
 
 import apt_pkg
 
@@ -168,7 +170,11 @@
                         except OSError:
                             pass
 
-            return open(fullname, "r")
+            if sys.version_info[0] < 3:
+                return codecs.open(fullname, 'r', 'UTF-8', 'replace')
+            else:
+                return io.open(fullname, mode='r', encoding='UTF-8',
+                               errors='replace')
 
         tag_files = []
         for mirror in mirrors:
diff -Nru germinate-2.9/germinate/tests/test_archive.py 
germinate-2.10/germinate/tests/test_archive.py
--- germinate-2.9/germinate/tests/test_archive.py       2012-01-16 
13:56:58.000000000 +0000
+++ germinate-2.10/germinate/tests/test_archive.py      2012-07-23 
11:33:03.000000000 +0100
@@ -57,12 +57,13 @@
         os.makedirs(source_dir)
         packages = gzip.GzipFile(os.path.join(binary_dir, "Packages.gz"), "w")
         try:
-            packages.write(textwrap.dedent("""\
+            packages.write(textwrap.dedent(b"""\
                 Package: test
                 Version: 1.0
                 Architecture: i386
+                Maintainer: 
\xc3\xba\xe1\xb8\x83\xc3\xba\xc3\xb1\xc5\xa7\xc5\xaf\x20\xc4\x91\xc9\x99\x76\xe1\xba\xbd\xc5\x82\xc3\xb5\xe1\xb9\x97\xc3\xa8\xc5\x97\xe1\xb9\xa1
 
-                """).encode("UTF-8"))
+                """.decode("UTF-8")).encode("UTF-8"))
         finally:
             packages.close()
         sources = gzip.GzipFile(os.path.join(source_dir, "Sources.gz"), "w")

Thanks,

-- 
Colin Watson                                       [[email protected]]

--- End Message ---
--- Begin Message ---
On 2012-08-06 12:25, Colin Watson wrote:
> Package: release.debian.org
> Severity: normal
> User: [email protected]
> Usertags: unblock
> 
> germinate 2.10 fixes a failure when running in the C locale, which is a
> regression from the Python 2-based version in squeeze.  The fix is
> unit-tested and confirmed to work in Ubuntu.  The diff follows.
> 
>   https://bugs.launchpad.net/ubuntu/+source/germinate/+bug/1025818
> 
> unblock germinate/2.10
> 
> [...]

Unblocked, thanks.

~Niels

--- End Message ---

Reply via email to