This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2000c74598e202d7302984e23b168d00711cf145

commit 2000c74598e202d7302984e23b168d00711cf145
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sat Dec 25 01:30:45 2021 +0100

    dpkg-buildpackage: On dpkg-build-api >= 1 avoid build target heuristics
---
 man/dpkg-build-api.pod       | 6 ++++++
 scripts/dpkg-buildpackage.pl | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/man/dpkg-build-api.pod b/man/dpkg-build-api.pod
index 5f52678fd..78d5d386e 100644
--- a/man/dpkg-build-api.pod
+++ b/man/dpkg-build-api.pod
@@ -62,6 +62,12 @@ B<dpkg-buildpackage> defaults to B<Rules-Requires-Root> to 
B<no>.
 To restore the B<v0> behavior B<Rules-Requires-Root> should be set to
 B<binary-targets>.
 
+=item *
+
+B<dpkg-buildpackage> requires all required F<debian/rules> targets.
+That is B<clean>, B<build>, B<build-indep>, B<build-arch>,
+B<binary-indep> and B<binary-arch>.
+
 =back
 
 =item v0
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 580bb92e4..7b8181b48 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -1060,6 +1060,9 @@ sub build_target_fallback {
     return if $buildtarget eq 'build';
     return if scalar @debian_rules != 1;
 
+    # Avoid further heuristics in newer dpkg-build-api levels.
+    return if get_build_api($ctrl) >= 1;
+
     # Check if we are building both arch:all and arch:any packages, in which
     # case we now require working build-indep and build-arch targets.
     my $pkg_arch = 0;

-- 
Dpkg.Org's dpkg

Reply via email to