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-05-20 21:57:40 -0400 |
commit | 527621ed8b8ac2a4b0384baa475070d87415a253 (patch) | |
tree | ea61b8e2ba476d245a0d8b32d6a772134b139e1c /makechrootpkg.in | |
parent | 38cc02ec9a7e27c9c35380215d8535c857a704a7 (diff) |
-rw-r--r-- | makechrootpkg.in | 13 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 0b48d5b..98cd1b5 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -202,6 +202,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 { |