summaryrefslogtreecommitdiff
path: root/src/chroot-tools/mkarchroot.patch
blob: a0ea0f0fbc1d50e6163a239d7871b0a4d63bde44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- mkarchroot.in	2014-01-05 18:51:15.231500986 -0500
+++ mkarchroot	2014-03-20 15:05:06.885086610 -0400
@@ -65,6 +65,11 @@
 	chmod 0755 "$working_dir"
 fi
 
+_env=()
+while read -r varname; do
+	_env+=("$varname=${!varname}")
+done < { declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$'; }
+env -i "${_env[@]}" \
 pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
   "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
 
@@ -72,7 +77,7 @@
 echo 'LANG=C' > "$working_dir/etc/locale.conf"
 echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"
 
-exec arch-nspawn \
+exec $(librelib chroot/arch-nspawn) \
 	${pac_conf:+-C "$pac_conf"} \
 	${makepkg_conf:+-M "$makepkg_conf"} \
 	${cache_dir:+-c "$cache_dir"} \