Revert "archiso/mkarchiso: clear environment variables when chrooting"
This reverts commit 3d6651abf7
.
A missing $PATH breaks scripts that do not hardcode binary paths.
Fixes https://bugs.archlinux.org/task/71416 .
This commit is contained in:
parent
33a2ab6332
commit
c4d1109e49
@ -322,18 +322,17 @@ _make_custom_airootfs() {
|
|||||||
|
|
||||||
# Install desired packages to airootfs
|
# Install desired packages to airootfs
|
||||||
_make_packages() {
|
_make_packages() {
|
||||||
local envvars_in_chroot=("SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}")
|
|
||||||
_msg_info "Installing packages to '${pacstrap_dir}/'..."
|
_msg_info "Installing packages to '${pacstrap_dir}/'..."
|
||||||
|
|
||||||
if [[ -n "${gpg_key}" ]]; then
|
if [[ -n "${gpg_key}" ]]; then
|
||||||
exec {ARCHISO_GNUPG_FD}<>"${work_dir}/pubkey.gpg"
|
exec {ARCHISO_GNUPG_FD}<>"${work_dir}/pubkey.gpg"
|
||||||
envvars_in_chroot+=("ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}")
|
export ARCHISO_GNUPG_FD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${quiet}" = "y" ]]; then
|
if [[ "${quiet}" = "y" ]]; then
|
||||||
env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
|
pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
|
||||||
else
|
else
|
||||||
env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
|
pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${gpg_key}" ]]; then
|
if [[ -n "${gpg_key}" ]]; then
|
||||||
@ -375,7 +374,7 @@ _make_customize_airootfs() {
|
|||||||
_msg_info "Running customize_airootfs.sh in '${pacstrap_dir}' chroot..."
|
_msg_info "Running customize_airootfs.sh in '${pacstrap_dir}' chroot..."
|
||||||
_msg_warning "customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version."
|
_msg_warning "customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version."
|
||||||
chmod -f -- +x "${pacstrap_dir}/root/customize_airootfs.sh"
|
chmod -f -- +x "${pacstrap_dir}/root/customize_airootfs.sh"
|
||||||
eval -- env -i "SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
|
eval -- arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
|
||||||
rm -- "${pacstrap_dir}/root/customize_airootfs.sh"
|
rm -- "${pacstrap_dir}/root/customize_airootfs.sh"
|
||||||
_msg_info "Done! customize_airootfs.sh run successfully."
|
_msg_info "Done! customize_airootfs.sh run successfully."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user