r52735 - in /desktop/unstable/glib2.0/debian: changelog patches/git_glib-mkenums-utf8.patch patches/series

jbicha-guest at users.alioth.debian.org jbicha-guest at users.alioth.debian.org
Thu Aug 3 15:47:06 UTC 2017


Author: jbicha-guest
Date: Thu Aug  3 15:47:06 2017
New Revision: 52735

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=52735
Log:
Cherry-pick fix for "glib-mkenums: UnicodeDecodeError" (Closes: #870310)

Added:
    desktop/unstable/glib2.0/debian/patches/git_glib-mkenums-utf8.patch
Modified:
    desktop/unstable/glib2.0/debian/changelog
    desktop/unstable/glib2.0/debian/patches/series

Modified: desktop/unstable/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/changelog?rev=52735&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/changelog	[utf-8] Thu Aug  3 15:47:06 2017
@@ -5,6 +5,9 @@
 
   [ Jeremy Bicha ]
   * Bump Breaks/Replaces: libglib2.0-dev to 2.53 (Closes: #867679)
+  * Add git_glib-mkenums-utf8.patch:
+    - Backport commit to fix "glib-mkenums: UnicodeDecodeError"
+      (Closes: #870310)
 
  -- Matthias Klumpp <mak at debian.org>  Sun, 30 Jul 2017 14:07:26 +0200
 

Added: desktop/unstable/glib2.0/debian/patches/git_glib-mkenums-utf8.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/git_glib-mkenums-utf8.patch?rev=52735&op=file
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/git_glib-mkenums-utf8.patch	(added)
+++ desktop/unstable/glib2.0/debian/patches/git_glib-mkenums-utf8.patch	[utf-8] Thu Aug  3 15:47:06 2017
@@ -0,0 +1,54 @@
+From c2dace6b8b982ca821edc29501c7635d008a8357 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <creiter at src.gnome.org>
+Date: Wed, 19 Jul 2017 11:43:47 +0200
+Subject: glib-mkenums: Use utf-8 for reading files
+
+On Windows open() defaults to ANSI and on Python 2 it doesn't take
+an encoding. Use io.open() instead which provides the same interface
+on both Python versions.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=785113
+---
+ gobject/glib-mkenums.in | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index 3b9a30c..e22b317 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -14,6 +14,7 @@ import os
+ import re
+ import sys
+ import tempfile
++import io
+ 
+ VERSION_STR = '''glib-mkenums version @VERSION@
+ glib-genmarshal comes with ABSOLUTELY NO WARRANTY.
+@@ -147,7 +148,7 @@ def parse_entries(file, file_name):
+         m = re.match(r'\#include\s*<([^>]*)>', line)
+         if m:
+             newfilename = os.path.join("..", m.group(1))
+-            newfile = open(newfilename)
++            newfile = io.open(newfilename, encoding="utf-8")
+ 
+             if not parse_entries(newfile, newfilename):
+                 return False
+@@ -243,7 +244,7 @@ def read_template_file(file):
+            }
+     in_ = 'junk'
+ 
+-    ifile = open(file)
++    ifile = io.open(file, encoding="utf-8")
+     for line in ifile:
+         m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line)
+         if m:
+@@ -397,7 +398,7 @@ def process_file(curfilename):
+     firstenum = True
+ 
+     try:
+-        curfile = open(curfilename)
++        curfile = io.open(curfilename, encoding="utf-8")
+     except FileNotFoundError:
+         print_warning('No file "{}" found.'.format(curfilename))
+         return
+

Modified: desktop/unstable/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/series?rev=52735&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/patches/series	[utf-8] Thu Aug  3 15:47:06 2017
@@ -11,3 +11,4 @@
 0001-timer-test-use-volatile-for-locals.patch
 skip-broken-timer-test.patch
 0001-Fix-trashing-on-overlayfs.patch
+git_glib-mkenums-utf8.patch




More information about the pkg-gnome-commits mailing list