Package: sbuild
Version: 0.65.0-1
Severity: normal

Sbuild likes to print out unicode characters, which improves the process
very little, but is extremely annoying when it fails (when running on a
non-unicode terminal, say). This patch replaces the unicode with ascii.

From 43f8bf8ad4a62b6997ff8bb274f9289d570247f4 Mon Sep 17 00:00:00 2001
From: Dima Kogan <d...@secretsauce.net>
Date: Sat, 18 Oct 2014 15:41:59 -0700
Subject: [PATCH] Replaced all unicode-printed chars with plain ASCII

---
 lib/Sbuild.pm                   | 10 +++++-----
 lib/Sbuild/Base.pm              | 16 ++++++++--------
 lib/Sbuild/Build.pm             |  2 +-
 lib/Sbuild/ChrootInfoSchroot.pm |  6 +++---
 lib/Sbuild/Conf.pm              |  2 +-
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/lib/Sbuild.pm b/lib/Sbuild.pm
index ca9d5ec..8aa5e2d 100644
--- a/lib/Sbuild.pm
+++ b/lib/Sbuild.pm
@@ -139,12 +139,12 @@ sub dump_file ($) {
     if (-r "$file" &&
 	open(SOURCES, "<$file")) {
 
-	print "   ┌────────────────────────────────────────────────────────────────────────\n";
+	print "   +------------------------------------------------------------------------\n";
 	while (<SOURCES>) {
 	    chomp;
-	    print "   │$_\n";
+	    print "   |$_\n";
 	}
-	print "   └────────────────────────────────────────────────────────────────────────\n";
+	print "   +------------------------------------------------------------------------\n";
 	close(SOURCES) or print "Failed to close $file\n";
     } else {
 	print "W: Failed to open $file\n";
@@ -212,7 +212,7 @@ sub check_packages ($$) {
 	}
 
 	print "DELETE             ADD\n";
-	print "──────────────────────────────────────\n";
+	print "--------------------------------------\n";
 	my $i = 0;
 	my $j = 0;
 
@@ -284,7 +284,7 @@ sub usage_error ($$) {
     my $message = shift;
 
     print STDERR "E: $message\n";
-    print STDERR "I: Run “$program --help” to list usage example and all available options\n";
+    print STDERR "I: Run '$program --help' to list usage example and all available options\n";
     exit 1;
 }
 
diff --git a/lib/Sbuild/Base.pm b/lib/Sbuild/Base.pm
index 25a4607..fbbb15a 100644
--- a/lib/Sbuild/Base.pm
+++ b/lib/Sbuild/Base.pm
@@ -120,9 +120,9 @@ sub log_section {
     my $section = shift;
 
     $self->log("\n");
-    $self->log('╔', '═' x 78, '╗', "\n");
-    $self->log('║', " $section ", ' ' x (80 - length($section) - 4), '║', "\n");
-    $self->log('╚', '═' x 78, '╝', "\n\n");
+    $self->log('+', '=' x 78, '+', "\n");
+    $self->log('|', " $section ", ' ' x (80 - length($section) - 4), '|', "\n");
+    $self->log('+', '=' x 78, '+', "\n\n");
 }
 
 sub log_subsection {
@@ -130,9 +130,9 @@ sub log_subsection {
     my $section = shift;
 
     $self->log("\n");
-    $self->log('┌', '─' x 78, '┐', "\n");
-    $self->log('│', " $section ", ' ' x (80 - length($section) - 4), '│', "\n");
-    $self->log('└', '─' x 78, '┘', "\n\n");
+    $self->log('+', '-' x 78, '+', "\n");
+    $self->log('|', " $section ", ' ' x (80 - length($section) - 4), '|', "\n");
+    $self->log('+', '-' x 78, '+', "\n\n");
 }
 
 sub log_subsubsection {
@@ -141,13 +141,13 @@ sub log_subsubsection {
 
     $self->log("\n");
     $self->log("$section\n");
-    $self->log('─' x (length($section)), "\n\n");
+    $self->log('-' x (length($section)), "\n\n");
 }
 
 sub log_sep {
     my $self = shift;
 
-    $self->log('─' x 80, "\n");
+    $self->log('-' x 80, "\n");
 }
 
 1;
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index bec4868..8791df9 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -2192,7 +2192,7 @@ sub open_build_log {
 	    # process in log stream).
 	    if (m/$filter_regex/) {
 		($text,$replacement)=($1,$2);
-		$replacement = "«$replacement»";
+		$replacement = "<<$replacement>>";
 		push (@filter, [$text, $replacement]);
 		$_ = "I: NOTICE: Log filtering will replace '$text' with '$replacement'\n";
 	    } elsif (m/$colour_regex/) {
diff --git a/lib/Sbuild/ChrootInfoSchroot.pm b/lib/Sbuild/ChrootInfoSchroot.pm
index be3ddd1..ac1bcc7 100644
--- a/lib/Sbuild/ChrootInfoSchroot.pm
+++ b/lib/Sbuild/ChrootInfoSchroot.pm
@@ -61,15 +61,15 @@ sub get_info_from_stream {
 
 	last if ! $_;
 
-	if (/\s*─── Chroot ───/ &&
+	if (/\s*--- Chroot ---/ &&
 	    $tmp{'Namespace'} eq "") {
 	    $tmp{'Namespace'} = 'chroot';
 	}
-	if (/\s*─── Session ───/ &&
+	if (/\s*--- Session ---/ &&
 	    $tmp{'Namespace'} eq "") {
 	    $tmp{'Namespace'} = 'session';
 	}
-	if (/\s*─── Source ───/ &&
+	if (/\s*--- Source ---/ &&
 	    $tmp{'Namespace'} eq "") {
 	    $tmp{'Namespace'} = 'source';
 	}
diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm
index e71e80f..8076030 100644
--- a/lib/Sbuild/Conf.pm
+++ b/lib/Sbuild/Conf.pm
@@ -575,7 +575,7 @@ sub setup ($) {
 	    VARNAME => 'lock_interval',
 	    GROUP => 'Build timeouts',
 	    DEFAULT => 5,
-	    HELP => 'Lock wait interval (seconds).  Maximum wait time is (max_lock_trys × lock_interval).'
+	    HELP => 'Lock wait interval (seconds).  Maximum wait time is (max_lock_trys x lock_interval).'
 	},
 	'CHROOT_MODE'				=> {
 	    TYPE => 'STRING',
-- 
2.0.0


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (700, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: armel

Kernel: Linux 3.16-3-amd64 (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

Versions of packages sbuild depends on:
ii  adduser         3.113+nmu3
ii  apt-utils       1.0.6
ii  libsbuild-perl  0.65.0-1
ii  perl            5.18.2-4
ii  perl-modules    5.18.2-4

Versions of packages sbuild recommends:
ii  debootstrap  1.0.60
ii  fakeroot     1.20-3

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  wget       1.15-1

-- Configuration Files:
/etc/sbuild/sbuild.conf changed:
$build_arch_all = 1;
1;


-- no debconf information

Reply via email to