]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Getopt.pm
Support debian/foo.os files to suppliment previous debian/foo.arch file support....
[debhelper.git] / Debian / Debhelper / Dh_Getopt.pm
index 28e4b79a978c5acc8944f395c5fef336049cf884..5585a54ceca1f8b6efcb595ac2c694762a10fcef 100644 (file)
@@ -91,6 +91,8 @@ sub getoptions {
                "N=s" => \&ExcludePackage,
                "no-package=s" => \&ExcludePackage,
        
+               "remaining-packages" => \$dh{EXCLUDE_LOGGED},
+       
                "dbg-package=s" => \&AddDebugPackage,
                
                "s" => \&AddPackage,
@@ -164,9 +166,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};
@@ -220,6 +224,10 @@ sub parseopts {
        my $package;
        my %packages_seen;
        foreach $package (@{$dh{DOPACKAGES}}) {
+               if (defined($dh{EXCLUDE_LOGGED}) &&
+                   grep { $_ eq basename($0) } load_log($package)) {
+                       $exclude_package{$package}=1;
+               }
                if (! $exclude_package{$package}) {
                        if (! exists $packages_seen{$package}) {
                                $packages_seen{$package}=1;