1 |
tetromino 13/09/01 21:56:10 |
2 |
|
3 |
Added: gdbus-codegen-2.36.4-input-encoding.patch |
4 |
Log: |
5 |
Do not open input files as build-environment encoding text when using python3 as the python interpreter (bug #483060, thanks to Fernando V. (likewhoa)). |
6 |
|
7 |
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-util/gdbus-codegen/files/gdbus-codegen-2.36.4-input-encoding.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/gdbus-codegen/files/gdbus-codegen-2.36.4-input-encoding.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/gdbus-codegen/files/gdbus-codegen-2.36.4-input-encoding.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gdbus-codegen-2.36.4-input-encoding.patch |
16 |
=================================================================== |
17 |
From a7f2765dbabf889df065e601fc072644dda625e4 Mon Sep 17 00:00:00 2001 |
18 |
From: Daiki Ueno <ueno@××××××××.org> |
19 |
Date: Fri, 16 Aug 2013 17:44:14 +0200 |
20 |
Subject: [PATCH] codegen: Treat input file as binary |
21 |
|
22 |
Under C locale, open() in Python 3 sets the file encoding to ASCII. |
23 |
As expat looks at encoding="..." in XML declaration, gdbus-codegen can |
24 |
simply open the input file as binary and let expat decode the content. |
25 |
|
26 |
https://bugzilla.gnome.org/show_bug.cgi?id=696633 |
27 |
--- |
28 |
gio/gdbus-2.0/codegen/codegen_main.py | 2 +- |
29 |
1 file changed, 1 insertion(+), 1 deletion(-) |
30 |
|
31 |
diff --git a/gio/gdbus-2.0/codegen/codegen_main.py b/gio/gdbus-2.0/codegen/codegen_main.py |
32 |
index aa7984e..69cf3e7 100755 |
33 |
--- a/gio/gdbus-2.0/codegen/codegen_main.py |
34 |
+++ b/gio/gdbus-2.0/codegen/codegen_main.py |
35 |
@@ -166,7 +166,7 @@ def codegen_main(): |
36 |
|
37 |
all_ifaces = [] |
38 |
for fname in args: |
39 |
- f = open(fname) |
40 |
+ f = open(fname, 'rb') |
41 |
xml_data = f.read() |
42 |
f.close() |
43 |
parsed_ifaces = parser.parse_dbus_xml(xml_data) |
44 |
-- |
45 |
1.8.3.2 |