set MMDEBSTRAP_FORMAT in hooks

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-10-23 10:35:07 +02:00
parent e77e194ebd
commit 629187cd68
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1630,6 +1630,7 @@ sub run_hooks {
if (defined $options->{suite}) { if (defined $options->{suite}) {
push @env_opts, "MMDEBSTRAP_SUITE=$options->{suite}"; push @env_opts, "MMDEBSTRAP_SUITE=$options->{suite}";
} }
push @env_opts, "MMDEBSTRAP_FORMAT=$options->{format}";
# Storing the hook name is important for hook scripts to potentially change # Storing the hook name is important for hook scripts to potentially change
# their behavior depending on the hook. It's also important for when the # their behavior depending on the hook. It's also important for when the
# hook wants to use the mmdebstrap --hook-helper. # hook wants to use the mmdebstrap --hook-helper.
@ -7020,11 +7021,12 @@ C<APT_CONFIG> as written by mmdebstrap it can be found in the
C<MMDEBSTRAP_APT_CONFIG> environment variable. All environment variables set by C<MMDEBSTRAP_APT_CONFIG> environment variable. All environment variables set by
the user are preserved, except for C<TMPDIR> which is cleared. See section the user are preserved, except for C<TMPDIR> which is cleared. See section
B<TMPDIR>. Furthermore, C<MMDEBSTRAP_MODE> will store the mode set by B<TMPDIR>. Furthermore, C<MMDEBSTRAP_MODE> will store the mode set by
B<--mode>, C<MMDEBSTRAP_HOOK> stores which hook is currently run (setup, B<--mode>, C<MMDEBSTRAP_FORMAT> stores the format chosen by B<--format>,
extract, essential, customize), C<MMDEBSTRAP_ARGV0> stores the name of the C<MMDEBSTRAP_HOOK> stores which hook is currently run (setup, extract,
binary with which B<mmdebstrap> was executed and C<MMDEBSTRAP_VERBOSITY> stores essential, customize), C<MMDEBSTRAP_ARGV0> stores the name of the binary with
the numerical verbosity level (0 for no output, 1 for normal, 2 for verbose and which B<mmdebstrap> was executed and C<MMDEBSTRAP_VERBOSITY> stores the
3 for debug output). The C<MMDEBSTRAP_INCLUDE> variable stores the list of numerical verbosity level (0 for no output, 1 for normal, 2 for verbose and 3
for debug output). The C<MMDEBSTRAP_INCLUDE> variable stores the list of
packages, apt patterns or file paths given by the B<--include> option, packages, apt patterns or file paths given by the B<--include> option,
separated by a comma and with commas and percent signs in the option values separated by a comma and with commas and percent signs in the option values
urlencoded. If I<SUITE> name was supplied, it's stored in C<MMDEBSTRAP_SUITE>. urlencoded. If I<SUITE> name was supplied, it's stored in C<MMDEBSTRAP_SUITE>.