From a7b7e16033960d9f56d149a8334a8b7141406373 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Thu, 22 Dec 2022 11:51:01 +0100 Subject: [PATCH] move extract hook execution after run_prepare so that fakechroot works in it --- mmdebstrap | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 84105d5..8d99ac6 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1818,14 +1818,16 @@ sub setup { } eval { - run_hooks('extract', $options); - + my $chrootcmd = []; if ($options->{variant} ne 'extract') { - my $chrootcmd = []; if ($options->{mode} ne 'chrootless') { $chrootcmd = run_prepare($options); } + } + run_hooks('extract', $options, $essential_pkgs); + + if ($options->{variant} ne 'extract') { run_essential($options, $essential_pkgs, $chrootcmd, $cached_debs); run_hooks('essential', $options); @@ -6948,10 +6950,6 @@ respectively. Extract the downloaded packages into the rootfs. -=item B - -Run B<--extract-hook> options and all F scripts in B<--hook-dir>. - =item B In B mode, environment variables C will be set up @@ -6960,6 +6958,10 @@ in. For foreign B environments, C and C are set up accordingly. This step is not carried out in B mode and neither for the B variant. +=item B + +Run B<--extract-hook> options and all F scripts in B<--hook-dir>. + =item B Uses C to properly install all packages that have been