From: Frank Lichtenheld Date: Sat, 29 Sep 2007 14:36:18 +0000 (+0200) Subject: dpkg-buildpackage: Make the testcommand more sensible X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da1ac541d9db84cdaedc32ebce2878e0091e45c7;p=dpkg dpkg-buildpackage: Make the testcommand more sensible Instead of testing /usr/bin/$cmd, test `which $cmd`. --- diff --git a/ChangeLog b/ChangeLog index 1eef0d53..6fa71cc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-09-29 Frank Lichtenheld + * scripts/dpkg-buildpackage.pl (testcommand): + Make the check more sensible. Instead of testing + /usr/bin/$cmd, test `which $cmd`. + * scripts/dpkg-buildpackage.pl (signfile): Call gpg with --utf8-strings since otherwise the key lookup fails with non-ASCII UTF8-encoded names. diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index 88b3d123..1387cab8 100644 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -79,7 +79,9 @@ Options: sub testcommand { my ($cmd) = @_; - return -x "/usr/bin/$cmd"; + my $fullcmd = `which $cmd`; + chomp $fullcmd; + return $fullcmd && -x $fullcmd; } my $rootcommand = '';