From 8ee5374c67a1ed7f48a40567e764865ad26a064e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 9 Apr 2012 17:20:33 +0200 Subject: [PATCH] Don't use Term::ANSIColor in buildd mode. --- bin/blhc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/blhc b/bin/blhc index 829d782..10b39f3 100755 --- a/bin/blhc +++ b/bin/blhc @@ -22,7 +22,6 @@ use strict; use warnings; use Getopt::Long (); -use Term::ANSIColor (); use Text::ParseWords (); our $VERSION = '0.01'; @@ -449,6 +448,12 @@ along with this program. If not, see . exit 0; } +# Don't load Term::ANSIColor in buildd mode because Term::ANSIColor is not +# installed on Debian's buildds. +if (not $option_buildd) { + require Term::ANSIColor; +} + if ($option_all) { $option_pie = 1; $option_bindnow = 1; @@ -563,7 +568,7 @@ FILE: foreach my $file (@ARGV) { # Ignore compiler warnings for now. next if $line =~ /$warning_regex/o; - if ($line =~ /\033/) { # esc + if (not $option_buildd and $line =~ /\033/) { # esc # Remove all ANSI color sequences which are sometimes used in # non-verbose builds. $line = Term::ANSIColor::colorstrip($line); -- 2.43.2