Accepting request 547561 from home:dimstar:Factory

Fixes the issues seen in Staging:N

OBS-URL: https://build.opensuse.org/request/show/547561
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk-doc?expand=0&rev=57
This commit is contained in:
Dominique Leuenberger 2017-12-02 17:36:53 +00:00 committed by Git OBS Bridge
parent 8e0e728765
commit 03141a3413
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From 2d364e50140d17cf455365df537e5976d5d480d2 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Sat, 2 Dec 2017 16:11:50 +0100
Subject: [PATCH] Use logging infrastructure for LogWarning
Using pure 'print' statements often fail if we have a message containing
UTF-8, but output on a terminal/pipe not supporting UTF-8.
Instead of trying to en/decode (and likely fail all the time) use logging.warning
This causes a slight change of the format, as the log is prefixed with WARNING:root
but that seems better than crashing
https://bugzilla.gnome.org/show_bug.cgi?id=791131
---
gtkdoc/common.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtkdoc/common.py b/gtkdoc/common.py
index ca82263..286f7f3 100644
--- a/gtkdoc/common.py
+++ b/gtkdoc/common.py
@@ -148,7 +148,7 @@ def LogWarning(filename, line, message):
filename = filename or "unknown"
# TODO: write to stderr
- print ("%s:%d: warning: %s" % (filename, line, message))
+ logging.warning ("%s:%d: warning: %s" % (filename, line, message))
def CreateValidSGMLID(xml_id):
--
2.15.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Dec 2 15:17:35 UTC 2017 - dimstar@opensuse.org
- Add gtk-doc-fixxref-logging.patch: Use logging infrastructure for
LogWarning.
-------------------------------------------------------------------
Tue Oct 24 14:40:59 UTC 2017 - dimstar@opensuse.org

View File

@ -29,6 +29,8 @@ Source: https://download.gnome.org/sources/gtk-doc/1.26/%{name}-%{versio
Patch0: gtk-doc-Generate-main-sgml.patch
# PATCH-FIX-UPSTREAM gtk-doc-open-docs-as-utf8.patch dimstar@opensuse.org -- Always open files using utf-8
Patch1: gtk-doc-open-docs-as-utf8.patch
# PATCH-FIX-UPSTREAM gtk-doc-fixxref-logging.patch bgo#791131 dimstar@opensuse.org -- Use logging infrastructure for LogWarning
Patch2: gtk-doc-fixxref-logging.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libtool
BuildRequires: libxml2-tools
@ -63,6 +65,7 @@ generate the documentation for GLib, Gtk+, and GNOME.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
autoreconf -fiv