summaryrefslogtreecommitdiff
path: root/Debian
diff options
context:
space:
mode:
authorjoey <joey>2004-06-29 00:03:54 +0000
committerjoey <joey>2004-06-29 00:03:54 +0000
commitad092508ea530253700749a3119bf8a24dcc162e (patch)
tree9c5bcde32f8bea565082d18d9e749c39741309b6 /Debian
parent62d0cab3e04ec95e5c62a58d291018a1ebce228f (diff)
r1691: * dh_installinit: Added --error-handler option. Based on work by Thom May.
Closes: #209090
Diffstat (limited to 'Debian')
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm2
-rw-r--r--Debian/Debhelper/Dh_Lib.pm6
2 files changed, 8 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 1da5afd..0c807b7 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -162,6 +162,8 @@ sub parseopts {
"keep-debug" => \$options{KEEP_DEBUG},
+ "error-handler=s" => \$options{ERROR_HANDLER},
+
"<>" => \&NonOption,
);
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index f42f8bd..5449dca 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -100,6 +100,12 @@ sub init {
# This package gets special treatement: files and directories specified on
# the command line may affect it.
$dh{FIRSTPACKAGE}=${$dh{DOPACKAGES}}[0];
+
+ # If no error handling function was specified, just propigate
+ # errors out.
+ if (! exists $dh{ERROR_HANDLER} || ! defined $dh{ERROR_HANDLER}) {
+ $dh{ERROR_HANDLER}='exit $?';
+ }
}
# Pass it an array containing the arguments of a shell command like would