Package: debhelper
Version: 4.2.32
Severity: minor
Tags: patch

Dh_Lib::buildarch() function calls error($!) if dpkg-architecture is
not found (or there's some other problem with it), but $! is empty,
resulting in a silent and misleading exit in dh_* helper apps.


Current behavior:

$ perl ./dh_link etc/foo debian/debhelper/usr/lib/bar
dh_link:
$ echo $?
1

Suggested behavior:

$ perl ./dh_link etc/foo debian/debhelper/usr/lib/bar
dh_link: problem executing dpkg-architecture -qDEB_HOST_ARCH
$ echo $?
1


There's a number of simple ways to increase verbosity here, here's
just one:

--- Debian/Debhelper/Dh_Lib.pm  Fri Jan 20 22:52:44 CET 2006
+++ /buildd/test/debhelper/Debian/Debhelper/Dh_Lib.pm   Thu Mar 02 15:01:43 CET 
2006
@@ -553,7 +553,8 @@
        sub buildarch {
                return $arch if defined $arch;
 
-               $arch=`dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null` || 
error($!);
+               $arch=`dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null` || 
+                       error("problem executing dpkg-architecture 
-qDEB_HOST_ARCH");
                chomp $arch;
                return $arch;
        }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to