Commit 1489f754 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

arch-nspawn: setarch to CARCH

Allows calling makechrootpkg without worrying about the architecture
parent 7ca4eb82
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -96,4 +96,10 @@ fi
build_mount_args
copy_hostconf

exec systemd-nspawn -D "$working_dir" --machine "${working_dir//\//-}" "${mount_args[@]}" "$@"
eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")

exec ${CARCH:+setarch "$CARCH"} systemd-nspawn \
	-D "$working_dir" \
	--machine "${working_dir//\//-}" \
	"${mount_args[@]}" \
	"$@"
+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
		"${base_packages[@]}" || abort
else
	lock 9 "${chroots}/${repo}-${arch}/root.lock" "Locking clean chroot"
	setarch ${arch} arch-nspawn \
	arch-nspawn \
		-C "@pkgdatadir@/pacman-${repo}.conf" \
		-M "@pkgdatadir@/makepkg-${arch}.conf" \
		"${chroots}/${repo}-${arch}/root" \
@@ -77,4 +77,4 @@ else
fi

msg "Building in chroot for [${repo}] (${arch})..."
exec setarch "${arch}" makechrootpkg "${makechrootpkg_args[@]}" -r "${chroots}/${repo}-${arch}"
exec makechrootpkg "${makechrootpkg_args[@]}" -r "${chroots}/${repo}-${arch}"