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=b9216d07e9aac18a4c7cf0713363747f7a009717 commit b9216d07e9aac18a4c7cf0713363747f7a009717 Author: Guillem Jover <[email protected]> AuthorDate: Thu Dec 1 15:51:53 2022 +0100 dpkg-buildpackage: Add support for new preinit hook This new hook gets called before the tools have read any source file. Closes: #1023753 --- man/dpkg-buildpackage.pod | 3 +++ scripts/dpkg-buildpackage.pl | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/man/dpkg-buildpackage.pod b/man/dpkg-buildpackage.pod index 8dae99961..e60585989 100644 --- a/man/dpkg-buildpackage.pod +++ b/man/dpkg-buildpackage.pod @@ -40,6 +40,7 @@ consists of the following steps: =item B<1.> +It runs the B<preinit> hook before reading any source file. It prepares the build environment by setting various environment variables (see B<ENVIRONMENT>), runs the B<init> hook, and calls B<dpkg-source --before-build> (unless B<-T> or B<--target> @@ -487,6 +488,8 @@ The current I<hook-name> supported are: =over +=item B<preinit> + =item B<init> =item B<preclean> diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index f4760c0db..1532d8019 100755 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -103,8 +103,8 @@ sub usage { command to check the .changes file (no default). --check-option=<opt> pass <opt> to check <command>. --hook-<name>=<command> set <command> as the hook <name>, known hooks: - init preclean source build binary buildinfo - changes postclean check sign done + preinit init preclean source build binary + buildinfo changes postclean check sign done --buildinfo-file=<file> set the .buildinfo filename to generate. --buildinfo-option=<opt> pass option <opt> to dpkg-genbuildinfo. @@ -468,6 +468,12 @@ if (not defined $parallel and not $build_opts->has('parallel')) { $parallel = 'auto'; } +# +# Prepare the environment. +# + +run_hook('preinit', 1); + if (defined $parallel) { if ($parallel eq 'auto') { # Most Unices. -- Dpkg.Org's dpkg

