From da1ac541d9db84cdaedc32ebce2878e0091e45c7 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 29 Sep 2007 16:36:18 +0200 Subject: [PATCH] dpkg-buildpackage: Make the testcommand more sensible Instead of testing /usr/bin/$cmd, test `which $cmd`. --- ChangeLog | 4 ++++ scripts/dpkg-buildpackage.pl | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 = ''; -- 2.39.5