Package: ucf
Version: 3.0036
Severity: normal

Hi. Currently diffs generated by ucf produce TABs, which can make diffs
render improperly. This is especially an issue with side-by-side diffs,
where clobbered spacing makes the output unreadable. I'm attaching a
patch that asks diff to expand TABs into spaces to fix this. For
whiptail-based debconf this is necessary, but not sufficient: see

  http://bugs.debian.org/189026

>From 65ee66858dfdddff104c914b408ba42190d304ec Mon Sep 17 00:00:00 2001
From: Dima Kogan <dko...@debian.org>
Date: Sun, 14 May 2017 22:00:29 -0700
Subject: [PATCH] diffs use spaces instead of tabs

They are thus rendered faithfully on all terminals. whiptail-based debconf
dialogs have a second bug that needs to be fixed to make it work properly. I'm
about to file it
---
 ucf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ucf b/ucf
index cbbeada..cccb686 100755
--- a/ucf
+++ b/ucf
@@ -1011,11 +1011,11 @@ else
 		exit 0;
 		;;
 	    diff|D|d)
-		DIFF="$(run_diff diff -uBbw "$dest_file" "$new_file")"
+		DIFF="$(run_diff diff -uBbwt "$dest_file" "$new_file")"
 		show_diff "$DIFF"
 		;;
 	    sdiff|S|s)
-		DIFF="$(run_diff sdiff -BbW "$dest_file" "$new_file")"
+		DIFF="$(run_diff sdiff -BbWt "$dest_file" "$new_file")"
 		show_diff "$DIFF"
 		;;
 	    diff_threeway|3|t|T)
-- 
2.11.0



-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (800, 'unstable'), (700, 'testing'), (500, 'unstable-debug'), 
(500, 'stable')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.1 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ucf depends on:
ii  coreutils  8.26-3
ii  debconf    1.5.60

ucf recommends no packages.

ucf suggests no packages.

-- debconf information:
* ucf/show_diff:
* ucf/changeprompt: install_new
* ucf/changeprompt_threeway: keep_current
  ucf/title:
* ucf/conflicts_found:

Reply via email to