]> git.donarmstrong.com Git - debhelper.git/commitdiff
fix corner case
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 21 Mar 2009 01:52:36 +0000 (21:52 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 21 Mar 2009 01:52:36 +0000 (21:52 -0400)
If DH_INTERNAL_OPTIONS does not specify any packages, we don't want to
exclude them all!

Debian/Debhelper/Dh_Getopt.pm

index 28e4b79a978c5acc8944f395c5fef336049cf884..ef94e9403684c31a9c45a5941f54292ac9c59a47 100644 (file)
@@ -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};