index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | arch-nspawn.in | 1 | ||||
-rw-r--r-- | makechrootpkg.in | 11 |
diff --git a/arch-nspawn.in b/arch-nspawn.in index ea6e5ea..85af8c5 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -106,6 +106,7 @@ elif [[ $(cat "$working_dir/.arch-chroot") != $CHROOT_VERSION ]]; then fi build_mount_args +cache_dirs+=('/repo/') copy_hostconf eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf") diff --git a/makechrootpkg.in b/makechrootpkg.in index 878c663..3f4e009 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -308,6 +308,15 @@ EOF chmod 440 "$copydir/etc/sudoers.d/builduser-pacman" fi + if ! grep -q '^\[repo\]' "$copydir/etc/pacman.conf"; then + local line=$(grep -n '^\[' "$copydir/etc/pacman.conf" |grep -Fv ':[options]'|sed 's/:.*//;1q') + local ins='[repo] +SigLevel = Optional TrustAll +Server = file:///repo +' + sed -i "${line}i${ins//$'\n'/\\n}" "$copydir/etc/pacman.conf" + fi + # This is a little gross, but this way the script is recreated every time in the # working copy { @@ -399,6 +408,8 @@ _chrootprepare() { exit 1 fi + # Sync deps now, as networking may be disabled during _chrootbuild + cp /repo/repo.db /var/lib/pacman/sync/repo.db sudo -u builduser makepkg "$@" --nobuild } |