]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Getopt.pm
dpkg-buildflags is only used to set environment in v9
[debhelper.git] / Debian / Debhelper / Dh_Getopt.pm
index 06898923bdd540a085fc8eb735b8b9f9ae383f61..e4f3e4718fcab4b2e229c2e50c493348662d952a 100644 (file)
@@ -230,43 +230,44 @@ sub parseopts {
        }
        
        # If we have not been given any packages to act on, assume they
-       # want us to act on all relevant packages. Note we have to do
-       # this before excluding packages out, below.
-       my @packages_relevant=getpackages("both");
+       # want us to act on them all. Note we have to do this before excluding
+       # packages out, below.
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
                if ($dh{DOINDEP} || $dh{DOARCH}) {
                        # User specified that all arch (in)dep package be
                        # built, and there are none of that type.
-                       warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+                       if (! $dh{BLOCK_NOOP_WARNINGS}) {
+                               warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+                       }
                        exit(0);
                }
-               push @{$dh{DOPACKAGES}}, @packages_relevant;
+               push @{$dh{DOPACKAGES}},getpackages("both");
        }
 
        # Remove excluded packages from the list of packages to act on.
        # Also unique the list, in case some options were specified that
        # added a package to it twice.
-       # And avoid acting on packages that are not relevant.
        my @package_list;
        my $package;
        my %packages_seen;
-       my %packages_relevant=map { $_ => 1 } @packages_relevant;
        foreach $package (@{$dh{DOPACKAGES}}) {
                if (defined($dh{EXCLUDE_LOGGED}) &&
                    grep { $_ eq basename($0) } load_log($package)) {
                        $exclude_package{$package}=1;
                }
-               if (! $exclude_package{$package} &&
-                   ! exists $packages_seen{$package} &&
-                   $packages_relevant{$package}) {
-                       $packages_seen{$package}=1;
-                       push @package_list, $package;   
+               if (! $exclude_package{$package}) {
+                       if (! exists $packages_seen{$package}) {
+                               $packages_seen{$package}=1;
+                               push @package_list, $package;   
+                       }
                }
        }
        @{$dh{DOPACKAGES}}=@package_list;
 
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
-               warning("No packages to build.");
+               if (! $dh{BLOCK_NOOP_WARNINGS}) {
+                       warning("No packages to build.");
+               }
                exit(0);
        }