From: Joey Hess Date: Sat, 21 Mar 2009 01:52:36 +0000 (-0400) Subject: fix corner case X-Git-Tag: 7.2.7~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ce53a5276c9f3a388dce10f442c3c1659e3bccdb;p=debhelper.git fix corner case If DH_INTERNAL_OPTIONS does not specify any packages, we don't want to exclude them all! --- diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 28e4b79..ef94e94 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -164,9 +164,11 @@ sub parseopts { # at the command line to act on a specific package, and if # nothing is specified, the excludes will cause the set of # packages DH_INTERNAL_OPTIONS specifies to be acted on. - foreach my $package (getpackages()) { - if (! grep { $_ eq $package } @{$dh{DOPACKAGES}}) { - $exclude_package{$package}=1; + if (defined $dh{DOPACKAGES}) { + foreach my $package (getpackages()) { + if (! grep { $_ eq $package } @{$dh{DOPACKAGES}}) { + $exclude_package{$package}=1; + } } } delete $dh{DOPACKAGES};