Hello community,

here is the log from the commit of package gnome-terminal for openSUSE:Factory 
checked in at 2018-05-22 16:59:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-terminal (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-terminal.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-terminal"

Tue May 22 16:59:27 2018 rev:118 rq:606926 version:3.28.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-terminal/gnome-terminal.changes    
2018-04-27 15:59:32.819810280 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-terminal.new/gnome-terminal.changes       
2018-05-22 16:59:28.973638400 +0200
@@ -1,0 +2,7 @@
+Thu May  3 12:04:03 UTC 2018 - [email protected]
+
+- Add gnome-terminal-fix-output-commenting.patch: client: legacy:
+  Fix output commenting. Make sure each line starts with '#' even
+  if the message contains embedded newlines.
+
+-------------------------------------------------------------------

New:
----
  gnome-terminal-fix-output-commenting.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-terminal.spec ++++++
--- /var/tmp/diff_new_pack.HTzmmm/_old  2018-05-22 16:59:29.781609000 +0200
+++ /var/tmp/diff_new_pack.HTzmmm/_new  2018-05-22 16:59:29.781609000 +0200
@@ -26,6 +26,8 @@
 Source:         
http://download.gnome.org/sources/gnome-terminal/3.28/%{name}-%{version}.tar.xz
 # PATCH-FIX-UPSTREAM gnome-terminal-translate-encoding-names.patch bgo#795358 
-- prefs: editor: Translate encoding names
 Patch0:         gnome-terminal-translate-encoding-names.patch
+# PATCH-FIX-UPSTREAM gnome-terminal-fix-output-commenting.patch -- client: 
legacy: Fix output commenting
+Patch1:         gnome-terminal-fix-output-commenting.patch
 BuildRequires:  fdupes
 # Needed for search provider. It should not be needed in my opionion, we have 
to take this up with upstream, or just provide search provider interface 
definition file as source.
 BuildRequires:  gnome-shell

++++++ gnome-terminal-fix-output-commenting.patch ++++++
>From 47a949167af299e40b47fb6caf08ec06373b33d5 Mon Sep 17 00:00:00 2001
From: Christian Persch <[email protected]>
Date: Wed, 2 May 2018 19:32:52 +0200
Subject: client: legacy: Fix output commenting

Make sure each line starts with '#' even if the message
contains embedded newlines.

(cherry picked from commit d62c6ee988371cdf2af84a7898cee686c484aff8)
---
 src/terminal-options.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/terminal-options.c b/src/terminal-options.c
index e00ca92..d1e8a4a 100644
--- a/src/terminal-options.c
+++ b/src/terminal-options.c
@@ -41,27 +41,25 @@
 
 static int verbosity = 1;
 
-/* @freeme is a workaround for Clang; see gnome-terminal bug 790318. */
-static char * G_GNUC_FORMAT (2)
-format_as_comment (char** freeme, const char *format)
-{
-  return *freeme = g_strdup_printf ("# %s", format);
-}
-
 void
 terminal_fprintf (FILE* fp,
                   int verbosity_level,
                   const char* format,
                   ...)
 {
-        if (verbosity < verbosity_level)
-                return;
-
-        gs_free char* freeme;
-        va_list args;
-        va_start(args, format);
-        g_vfprintf(fp, format_as_comment(&freeme, format), args);
-        va_end(args);
+  if (verbosity < verbosity_level)
+    return;
+
+  va_list args;
+  va_start(args, format);
+  gs_free char *str = g_strdup_vprintf(format, args);
+  va_end(args);
+
+  gs_strfreev char **lines = g_strsplit_set(str, "\n\r", -1);
+  for (gsize i = 0; lines[i]; ++i) {
+    if (lines[i][0] != '\0')
+      g_fprintf(fp, "# %s\n", lines[i]);
+  }
 }
 
 #if GLIB_CHECK_VERSION (2, 50, 0)
-- 
cgit v0.12


Reply via email to