Instead of testing /usr/bin/$cmd, test `which $cmd`.
2007-09-29 Frank Lichtenheld <djpig@debian.org>
+ * 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.
sub testcommand {
my ($cmd) = @_;
- return -x "/usr/bin/$cmd";
+ my $fullcmd = `which $cmd`;
+ chomp $fullcmd;
+ return $fullcmd && -x $fullcmd;
}
my $rootcommand = '';