NetBSD Problem Report #53112

From martin@duskware.de  Tue Mar 20 10:46:08 2018
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 635DD7A1B0
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 Mar 2018 10:46:08 +0000 (UTC)
Message-Id: <20180320104557.B34D75CC770@emmas.aprisoft.de>
Date: Tue, 20 Mar 2018 11:45:57 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: glib-mkenums fails with xfce4 source files
X-Send-Pr-Version: 3.95

>Number:         53112
>Category:       pkg
>Synopsis:       glib-mkenums fails with xfce4 source files
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 20 10:50:00 +0000 2018
>Closed-Date:    Sat Apr 28 20:01:30 +0000 2018
>Last-Modified:  Sat Apr 28 20:01:30 +0000 2018
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.14
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 8.99.14 NetBSD 8.99.14 (NIGHT-OWL) #588: Sat Mar 17 11:13:41 CET 2018 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:

glib-mkenums fails when trying to parse source code comments containing
umlauts in iso8859-* encoding:

gmake[2]: Entering directory '/usr/pkgobj/x11/xfce4-gtk2-engine/work/gtk-xfce-engine-3.2.0/gtk-3.0'
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/pkg/bin/glib-mkenums", line 709, in <module>
  File "/usr/pkg/bin/glib-mkenums", line 709, in <module>
    process_file(fname)
  File "/usr/pkg/bin/glib-mkenums", line 441, in process_file
    process_file(fname)
  File "/usr/pkg/bin/glib-mkenums", line 441, in process_file
    line = curfile.readline()
  File "/usr/pkg/lib/python2.7/codecs.py", line 314, in decode
    line = curfile.readline()
  File "/usr/pkg/lib/python2.7/codecs.py", line 314, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
(result, consumed) = self._buffer_decode(data, self.errors, final)
  File "/usr/pkg/bin/glib-mkenums", line 93, in replace_and_warn
  File "/usr/pkg/bin/glib-mkenums", line 93, in replace_and_warn
    err.object[err.start - 7:err.end + 7]))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd6 in position 7: ordinal not in range(128)
    err.object[err.start - 7:err.end + 7]))


Didn't we fix this already in the past?

>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53112: glib-mkenums fails with xfce4 source files
Date: Wed, 21 Mar 2018 17:41:10 +0000

 On Tue, Mar 20, 2018 at 10:50:00AM +0000, martin@NetBSD.org wrote:
 > Didn't we fix this already in the past?

 I thought I had fixed it with

 ----------------------------
 revision 1.225
 date: 2017-10-21 09:57:33 +0100;  author: prlw1;  state: Exp;  lines: +2 -2;  commitid: KUtdiNm0VP94HTbA;
 glib2-tools: Handle source files which are not utf-8

 python 3 is strict about file encodings. After glib-mkenums was
 translated from perl to python, build failures occur due to e.g.,
 ISO-8859-1 characters in authors' names as reported by martin@ in
 PR pkg/52631 for xfce4-gtk2-engines, but also causing build failures
 for at least libgnome and libgnomeui.

 Chritoph Reiter produced an elegant workaround, making use of the
 open() function's error decoding "replace" option:

   'replace' causes a replacement marker (such as '?') to be inserted
   where there is malformed data.

 which is applied here.

 https://bugzilla.gnome.org/show_bug.cgi?id=785113#c27
 ----------------------------

 and even got it in upstream:

 ----------------------------
 revision 1.61
 date: 2018-01-28 16:51:50 +0000;  author: wiz;  state: Exp;  lines: +2 -2;  commitid: BO5umQds80rBbFoA;
 glib2: update to 2.54.3.

 Overview of changes in GLib 2.54.3
 ==================================

 * Bugs fixed:
 ...
  785113 glib-mkenums Python port fixes

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53112: glib-mkenums fails with xfce4 source files
Date: Wed, 21 Mar 2018 20:31:16 +0100

 On Wed, Mar 21, 2018 at 05:45:00PM +0000, Patrick Welche wrote:
 >  On Tue, Mar 20, 2018 at 10:50:00AM +0000, martin@NetBSD.org wrote:
 >  > Didn't we fix this already in the past?
 >  
 >  I thought I had fixed it with

 Yes, and it works fine with PYTHON_DEFAULT_VERSION=36 (thanks Thomas for the
 hint).

 Martin

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 28 Apr 2018 09:37:37 +0000
State-Changed-Why:
Is this fixed enough or does it need attention for other (earlier?) python3?


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53112 (glib-mkenums fails with xfce4 source files)
Date: Sat, 28 Apr 2018 11:56:20 +0200

 IIRC the fix does not work with python < 3 - not sure if that is worth
 keeping the PR open for.

 Martin

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53112 (glib-mkenums fails with xfce4 source files)
Date: Sat, 28 Apr 2018 19:28:07 +0200

 On Sat, Apr 28, 2018 at 10:00:02AM +0000, Martin Husemann wrote:
 > The following reply was made to PR pkg/53112; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/53112 (glib-mkenums fails with xfce4 source files)
 > Date: Sat, 28 Apr 2018 11:56:20 +0200
 > 
 >  IIRC the fix does not work with python < 3 - not sure if that is worth
 >  keeping the PR open for.

 The 2.7 case is already fixed with glib2-tools-2.54.3nb1.

 Joerg

State-Changed-From-To: feedback->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 28 Apr 2018 20:01:30 +0000
State-Changed-Why:
joerg says closed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.