From 03141a3413b916eb475993bed3ab567f9e42bbcb44919d993ee323ece5c70663 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 2 Dec 2017 17:36:53 +0000 Subject: [PATCH 1/2] 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 --- gtk-doc-fixxref-logging.patch | 34 ++++++++++++++++++++++++++++++++++ gtk-doc.changes | 6 ++++++ gtk-doc.spec | 3 +++ 3 files changed, 43 insertions(+) create mode 100644 gtk-doc-fixxref-logging.patch diff --git a/gtk-doc-fixxref-logging.patch b/gtk-doc-fixxref-logging.patch new file mode 100644 index 0000000..485a809 --- /dev/null +++ b/gtk-doc-fixxref-logging.patch @@ -0,0 +1,34 @@ +From 2d364e50140d17cf455365df537e5976d5d480d2 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +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 + diff --git a/gtk-doc.changes b/gtk-doc.changes index d5a4a76..519437f 100644 --- a/gtk-doc.changes +++ b/gtk-doc.changes @@ -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 diff --git a/gtk-doc.spec b/gtk-doc.spec index 2d8d4df..aadb80e 100644 --- a/gtk-doc.spec +++ b/gtk-doc.spec @@ -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 From 1ea1b7051e97e31391e7b24638998707433b569d5b205b38aa35b3b6ddd0af03 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 2 Dec 2017 17:45:00 +0000 Subject: [PATCH 2/2] Accepting request 547578 from home:dimstar:branches:GNOME:Factory Plus bugref OBS-URL: https://build.opensuse.org/request/show/547578 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk-doc?expand=0&rev=58 --- gtk-doc.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-doc.changes b/gtk-doc.changes index 519437f..717def1 100644 --- a/gtk-doc.changes +++ b/gtk-doc.changes @@ -2,7 +2,7 @@ Sat Dec 2 15:17:35 UTC 2017 - dimstar@opensuse.org - Add gtk-doc-fixxref-logging.patch: Use logging infrastructure for - LogWarning. + LogWarning (bgo#791131). ------------------------------------------------------------------- Tue Oct 24 14:40:59 UTC 2017 - dimstar@opensuse.org