]> git.donarmstrong.com Git - debhelper.git/commitdiff
If neither -a or -i are specified, debhelper commands used to default to acting on...
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 1 Mar 2010 21:05:49 +0000 (16:05 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 1 Mar 2010 21:05:49 +0000 (16:05 -0500)
Debian/Debhelper/Dh_Lib.pm
debian/changelog
doc/PROGRAMMING

index f37ff5188699c09f938a8d365b4ea7f4ce5d87fa..b96ea3443091b77465c0a093dba9d7172ce8d7a2 100644 (file)
@@ -76,7 +76,7 @@ sub init {
        # Check if packages to build have been specified, if not, fall back to
        # the default, doing them all.
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
-               push @{$dh{DOPACKAGES}},@allpackages;
+               push @{$dh{DOPACKAGES}}, getpackages('both');
        }
 
        # Check to see if -P was specified. If so, we can only act on a single
@@ -667,8 +667,10 @@ sub sourcepackage {
 }
 
 # Returns a list of packages in the control file.
-# Pass "arch" or "indep" to specify arch-dependant or
-# independant. If nothing is specified, returns all packages.
+# Pass "arch" or "indep" to specify arch-dependant (that will be built
+# for the system's arch) or independant. If nothing is specified,
+# returns all packages. Also, "both" returns the union of "arch" and "indep"
+# packages.
 # As a side effect, populates %package_arches and %package_types with the
 # types of all packages (not only those returned).
 my (%package_types, %package_arches);
@@ -715,8 +717,8 @@ sub getpackages {
                        }
 
                        if ($package &&
-                           (($type eq 'indep' && $arch eq 'all') ||
-                            ($type eq 'arch' && ($arch eq 'any' ||
+                           ((($type eq 'indep' || $type eq 'both') && $arch eq 'all') ||
+                            (($type eq 'arch'  || $type eq 'both') && ($arch eq 'any' ||
                                             ($arch ne 'all' &&
                                              samearch(buildarch(), $arch)))) ||
                             ! $type)) {
index eca289ae6b9f39ed3ea9bee951e7dd8abd724d08..c44632ff33984da84d231bcab7b423b6ab8e3e41 100644 (file)
@@ -7,6 +7,13 @@ debhelper (7.4.16) UNRELEASED; urgency=low
     not all packages are acted on (due to architecture limits or flags).
     Closes: #570373
   * Typo. Closes: #571968
+  * If neither -a or -i are specified, debhelper commands used to default
+    to acting on all packages in the control file, which was a guaranteed
+    failure if the control file listed packages that did not build for the
+    target architecture. After recent optimisations, this default behavior
+    can efficiently be changed to the more sane default of acting on only
+    packages that can be built for the current architecture. This change
+    is mostly useful when using minimal rules files with dh. Closes: #572077
 
  -- Joey Hess <joeyh@debian.org>  Thu, 18 Feb 2010 17:53:27 -0500
 
index ca76b9c9bf346dd8a40b46aefdfb295139e3b572..b6d3d16e231aeaa9c744290667cddc4f0b271d21 100644 (file)
@@ -235,7 +235,9 @@ getpackages($type)
        Returns a list of packages in the control file.
        Pass "arch" or "indep" to specify arch-dependent or
        -independent. If nothing is specified, returns all
-       packages.
+       packages (including packages that are not built
+       for this architecture). Pass "both" to get the union
+       of "arch" and "indep" packages.
        As a side effect, populates %package_arches and %package_types with
        the types of all packages (not only those returned).
 inhibit_log()