Your message dated Tue, 3 Jan 2017 16:05:41 -0200
with message-id 
<CABwkT9qT-UdjzwX2Q5AaQsaB=5+gupxxho9boy34geeaaeh...@mail.gmail.com>
and subject line 
has caused the Debian Bug report #824142,
regarding mtr 0.86 uses suboptimal colours in curses (patch attached)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
824142: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824142
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mtr
Version: 0.86-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu yakkety ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * Pull commits from upstream to fix terminal colours (LP: #1581186)

As I note in the LP bug[1], this is hardly a critical issue, but it's
been driving me nuts since 0.86 landed.  Stupidly, I went and learned
curses and fixed it locally, which only then gave me the right search
terms (mtr + use_default_colors) to get Google to point out that it
was already fixed in upstream git.  So, I threw away my work, grabbed
the upstream commits, and here we are.

Would be lovely for you to pick this up in the Debian package, so I
can delete my recently-added delta from Ubuntu (and so Debian users
can enjoy slightly less broken colours in mtr in unstable).

... Adam

[1] https://bugs.launchpad.net/ubuntu/+source/mtr/+bug/1581186

-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety
  APT policy: (500, 'yakkety')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-21-lowlatency (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru mtr-0.86/debian/patches/color1.patch mtr-0.86/debian/patches/color1.patch
--- mtr-0.86/debian/patches/color1.patch	1969-12-31 17:00:00.000000000 -0700
+++ mtr-0.86/debian/patches/color1.patch	2016-05-12 12:58:21.000000000 -0600
@@ -0,0 +1,34 @@
+commit 63a1f1493bfbaf7e55eb7e20b3791fc8b14cf92d
+Author: Rogier Wolff <[email protected]>
+Date:   Mon Dec 29 09:22:46 2014 +0100
+
+    added use-default-colors...
+
+diff --git a/configure.ac b/configure.ac
+index d5d1b0e..7199781 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,6 +34,9 @@ AC_CHECK_FUNC(initscr, ,
+ 	AC_DEFINE(NO_CURSES, 1, Define if you don't have the curses libraries available.)
+ 	CURSES_OBJ=))))
+ 
++AC_CHECK_LIB(ncurses, use_default_colors, 
++  AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() command.]))
++
+ AC_CHECK_FUNCS(attron fcntl)
+ 
+ AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
+diff --git a/curses.c b/curses.c
+index 3904cb1..02b7937 100644
+--- a/curses.c
++++ b/curses.c
+@@ -701,6 +701,9 @@ void mtr_curses_open(void)
+   raw();
+   noecho(); 
+   start_color();
++#ifdef HAVE_USE_DEFAULT_COLORS
++  use_default_colors();
++#endif
+   int i;
+   for (i = 0; i < 8; i++)
+       init_pair(i+1, i, 0);
diff -Nru mtr-0.86/debian/patches/color2.patch mtr-0.86/debian/patches/color2.patch
--- mtr-0.86/debian/patches/color2.patch	1969-12-31 17:00:00.000000000 -0700
+++ mtr-0.86/debian/patches/color2.patch	2016-05-12 12:58:21.000000000 -0600
@@ -0,0 +1,30 @@
+commit 7571201cf7a3394e0dcd2b037aba1836089cc084
+Author: Narthorn <[email protected]>
+Date:   Mon Oct 12 13:24:57 2015 +0200
+
+    curses: Fix background transparency in terminal
+    
+    Patch comes from, and closes traviscross/mtr#72.
+
+diff --git a/curses.c b/curses.c
+index 02b7937..f95f5d1 100644
+--- a/curses.c
++++ b/curses.c
+@@ -700,13 +700,15 @@ void mtr_curses_open(void)
+   initscr();
+   raw();
+   noecho(); 
++  int bg_col = 0;
+   start_color();
+ #ifdef HAVE_USE_DEFAULT_COLORS
+-  use_default_colors();
++  if (use_default_colors() == OK)
++    bg_col = -1;
+ #endif
+   int i;
+   for (i = 0; i < 8; i++)
+-      init_pair(i+1, i, 0);
++      init_pair(i+1, i, bg_col);
+ 
+   mtr_curses_init();
+   mtr_curses_redraw();
diff -Nru mtr-0.86/debian/patches/series mtr-0.86/debian/patches/series
--- mtr-0.86/debian/patches/series	2015-12-07 12:49:27.000000000 -0700
+++ mtr-0.86/debian/patches/series	2016-05-12 12:58:41.000000000 -0600
@@ -0,0 +1,2 @@
+color1.patch
+color2.patch

--- End Message ---
--- Begin Message ---
Since v.087 just landed on unstable, this can be closed.

Samuel Henrique <samueloph>

--- End Message ---

Reply via email to