]> git.donarmstrong.com Git - debhelper.git/commitdiff
In v8 mode, debhelper only ever acts on packages that can be built for the given...
authorJoey Hess <joey@kitenet.net>
Fri, 28 May 2010 18:41:58 +0000 (14:41 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 28 May 2010 18:41:58 +0000 (14:41 -0400)
Debian/Debhelper/Dh_Getopt.pm
debhelper.pod
debian/changelog
doc/TODO

index 257fe6493c8d6de61600dbf3c0f596837c7f5882..06898923bdd540a085fc8eb735b8b9f9ae383f61 100644 (file)
@@ -230,8 +230,9 @@ sub parseopts {
        }
        
        # If we have not been given any packages to act on, assume they
-       # want us to act on them all. Note we have to do this before excluding
-       # packages out, below.
+       # want us to act on all relevant packages. Note we have to do
+       # this before excluding packages out, below.
+       my @packages_relevant=getpackages("both");
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
                if ($dh{DOINDEP} || $dh{DOARCH}) {
                        # User specified that all arch (in)dep package be
@@ -239,25 +240,27 @@ sub parseopts {
                        warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
                        exit(0);
                }
-               push @{$dh{DOPACKAGES}},getpackages("both");
+               push @{$dh{DOPACKAGES}}, @packages_relevant;
        }
 
        # 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}) {
-                       if (! exists $packages_seen{$package}) {
-                               $packages_seen{$package}=1;
-                               push @package_list, $package;   
-                       }
+               if (! $exclude_package{$package} &&
+                   ! exists $packages_seen{$package} &&
+                   $packages_relevant{$package}) {
+                       $packages_seen{$package}=1;
+                       push @package_list, $package;   
                }
        }
        @{$dh{DOPACKAGES}}=@package_list;
index a7735b1f8f5edec920ae333e94369e1471874c4e..c97db213c1037bd226c0336f1f33297e5e8f31d9 100644 (file)
@@ -530,6 +530,12 @@ can cause some packages to fail to build.
 
 dh requires the sequence to run be specified as the first parameter, and
 any switches come after it. Ie, use "dh $@ --foo", not "dh --foo $@"
+  
+=item -
+
+Debhelper only ever acts on packages that can be built for the given
+architecture, even if -N or -p are used to specify packages specific
+to other architectures.
 
 =back
 
index 5df9e2c98d84fa40d91023a696f2d47c7cd1e0a4..592ade3903d49a7baeaf3afb452d5ee7856dec36 100644 (file)
@@ -26,6 +26,9 @@ debhelper (7.9.1) UNRELEASED; urgency=low
     file with a name like HISTORY. Closes: #582749
   * dh_installchangelogs: Also look for changelog files in doc(s)
     subdirectories. Closes: #521258
+  * In v8 mode, debhelper only ever acts on packages that can be built
+    for the given architecture, even if -N or -p are used to specify
+    packages specific to other architectures.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 17 May 2010 20:01:19 -0400
 
index 1f500806ac829f2bc49362503d5c7db540364778..81275ac0ca63dce3b7ceb573818a11050a2c0f74 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,6 +1,5 @@
 v8:
 
-* better package arch filtering for -N , -p (#576990)
 * Support DEB_BUILD_OPTIONS=debug ; maybe also support passing
   -g -O2 by default. See patch (and discussion of why this breaks
   compatability) in #544844.