[Reproducible-commits] [dpkg] 46/90: dpkg-checkbuilddeps: Move build-essential:native to a new vendor hook

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Aug 29 18:26:14 UTC 2015


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

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 2d6bf271b4aff616a8dd591975b0c219e02d0ef5
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Jul 2 05:01:35 2015 +0200

    dpkg-checkbuilddeps: Move build-essential:native to a new vendor hook
    
    This package is distribution specific, and it does not belong in the
    generic build dependency checker.
---
 debian/changelog               |  2 ++
 scripts/Dpkg/Vendor/Debian.pm  |  4 ++++
 scripts/Dpkg/Vendor/Default.pm | 16 ++++++++++++++++
 scripts/dpkg-checkbuilddeps.pl |  9 +++++++--
 4 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index de3a9c6..dbe342b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dpkg (1.18.2) UNRELEASED; urgency=low
   * Fix dpkg-gencontrol to add correct binary filename to debian/files,
     even when overriding the Package field value with the -D option.
     Reported by Niels Thykier <niels at thykier.net>.
+  * Move the implicit build-essential:native Build-Depends from
+    dpkg-checkbuilddeps to a new vendor hook, as it is Debian-specific.
   * Perl modules:
     - Remove non-functional timezone name support from
       Dpkg::Changelog::Entry::Debian.
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 0148405..9b40e7a 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -52,6 +52,10 @@ sub run_hook {
     if ($hook eq 'keyrings') {
         return ('/usr/share/keyrings/debian-keyring.gpg',
                 '/usr/share/keyrings/debian-maintainers.gpg');
+    } elsif ($hook eq 'builtin-build-depends') {
+        return qw(build-essential:native);
+    } elsif ($hook eq 'builtin-build-conflicts') {
+        return ();
     } elsif ($hook eq 'register-custom-fields') {
     } elsif ($hook eq 'extend-patch-header') {
         my ($textref, $ch_info) = @params;
diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm
index a9c6a64..3685001 100644
--- a/scripts/Dpkg/Vendor/Default.pm
+++ b/scripts/Dpkg/Vendor/Default.pm
@@ -81,6 +81,18 @@ The hook is called when dpkg-source is checking a signature on a source
 package. It takes no parameters, but returns a (possibly empty) list of
 vendor-specific keyrings.
 
+=item builtin-build-depends ()
+
+The hook is called when dpkg-checkbuilddeps is initializing the source
+package build dependencies (since dpkg 1.18.2). It takes no parameters,
+but returns a (possibly empty) list of vendor-specific Build-Depends.
+
+=item builtin-build-conflicts ()
+
+The hook is called when dpkg-checkbuilddeps is initializing the source
+package build conflicts (since dpkg 1.18.2). It takes no parameters,
+but returns a (possibly empty) list of vendor-specific Build-Conflicts.
+
 =item register-custom-fields ()
 
 The hook is called in Dpkg::Control::Fields to register custom fields.
@@ -117,6 +129,10 @@ sub run_hook {
         return ();
     } elsif ($hook eq 'register-custom-fields') {
         return ();
+    } elsif ($hook eq 'builtin-build-depends') {
+        return ();
+    } elsif ($hook eq 'builtin-build-conflicts') {
+        return ();
     } elsif ($hook eq 'post-process-changelog-entry') {
         my $fields = shift @params;
     } elsif ($hook eq 'extend-patch-header') {
diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl
index cb9913e..522ac14 100755
--- a/scripts/dpkg-checkbuilddeps.pl
+++ b/scripts/dpkg-checkbuilddeps.pl
@@ -28,6 +28,7 @@ use Dpkg ();
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch);
+use Dpkg::Vendor qw(run_vendor_hook);
 use Dpkg::BuildProfiles qw(get_build_profiles set_build_profiles);
 use Dpkg::Deps;
 use Dpkg::Control::Info;
@@ -96,12 +97,16 @@ my $fields = $control->get_source();
 my $facts = parse_status("$admindir/status");
 
 unless (defined($bd_value) or defined($bc_value)) {
-    my @bd_list = ('build-essential:native', $fields->{'Build-Depends'});
+    my @bd_list;
+    push @bd_list, run_vendor_hook('builtin-build-depends');
+    push @bd_list, $fields->{'Build-Depends'};
     push @bd_list, $fields->{'Build-Depends-Arch'} if not $ignore_bd_arch;
     push @bd_list, $fields->{'Build-Depends-Indep'} if not $ignore_bd_indep;
     $bd_value = deps_concat(@bd_list);
 
-    my @bc_list = ($fields->{'Build-Conflicts'});
+    my @bc_list;
+    push @bc_list, run_vendor_hook('builtin-build-conflicts');
+    push @bc_list, $fields->{'Build-Conflicts'};
     push @bc_list, $fields->{'Build-Conflicts-Arch'} if not $ignore_bd_arch;
     push @bc_list, $fields->{'Build-Conflicts-Indep'} if not $ignore_bd_indep;
     $bc_value = deps_concat(@bc_list);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list