index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:40:06 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-08-02 17:04:24 -0400 |
commit | d555cda6348301fd3cfa180d6a4771216b3e0822 (patch) | |
tree | 4044563bdcaddb4f6c60b2b61b4b4313acf29ce2 | |
parent | 5f9b72f8cdc1a99446cca6f606cfa7f2d2b59f90 (diff) |
-rw-r--r-- | arch-nspawn.in | 1 | ||||
-rw-r--r-- | makechrootpkg.in | 13 |
diff --git a/arch-nspawn.in b/arch-nspawn.in index 7f432a6..96b3e38 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 -a '^CARCH=' "$working_dir/etc/makepkg.conf")" diff --git a/makechrootpkg.in b/makechrootpkg.in index d81be84..802ab65 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -196,6 +196,19 @@ builduser ALL = NOPASSWD: /usr/bin/pacman EOF chmod 440 "$copydir/etc/sudoers.d/builduser-pacman" + if ! grep -q '^\[repo\]' "$copydir/etc/pacman.conf"; then + local line + 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 + # Avoid having to use `pacman -Sy` to update [repo], as + # networking might be disabled inside of the chroot. + cp "$copydir/repo/repo.db" "$copydir/var/lib/pacman/sync/repo.db" + # This is a little gross, but this way the script is recreated every time in the # working copy { |