From 453558c4bb44b4bff43fcd22f96d4cfe1dbcf6f1 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 2 May 2013 05:24:28 +0200 Subject: mkarchroot: Refactor chroot running into a new script Separates the two features of mkarchroot. Provides users of the new arch-nspawn with the full feature set of systemd-nspawn. For example, this can be used to bind custom directories into the chroot. --- makechrootpkg.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'makechrootpkg.in') diff --git a/makechrootpkg.in b/makechrootpkg.in index 7796298..bf4034e 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -162,7 +162,7 @@ if [[ -n "${install_pkgs[*]}" ]]; then pkgname="${install_pkg##*/}" cp "$install_pkg" "$copydir/$pkgname" - mkarchroot -r "pacman -U /$pkgname --noconfirm" "$copydir" + arch-nspawn "$copydir" pacman -U /$pkgname --noconfirm (( ret += !! $? )) rm "$copydir/$pkgname" @@ -172,7 +172,7 @@ if [[ -n "${install_pkgs[*]}" ]]; then [[ -f PKGBUILD ]] || exit $ret fi -$update_first && mkarchroot -u "$copydir" +$update_first && arch-nspawn "$copydir" pacman -Syu --noconfirm mkdir -p "$copydir/build" @@ -288,7 +288,7 @@ exit 0 EOF chmod +x "$copydir/chrootbuild" -if mkarchroot -r "/chrootbuild" "$copydir"; then +if arch-nspawn "$copydir" /chrootbuild; then for pkgfile in "$copydir"/pkgdest/*.pkg.tar.?z; do if $add_to_db; then mkdir -p "$copydir/repo" -- cgit v1.2.3-70-g09d2