summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Lib.pm12
-rw-r--r--debian/changelog7
-rw-r--r--doc/PROGRAMMING4
3 files changed, 17 insertions, 6 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index f37ff518..b96ea344 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -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)) {
diff --git a/debian/changelog b/debian/changelog
index eca289ae..c44632ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING
index ca76b9c9..b6d3d16e 100644
--- a/doc/PROGRAMMING
+++ b/doc/PROGRAMMING
@@ -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()