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-03-26 18:20:56 -0400 |
commit | bef1b9f35ce6744c2a0bbc32f606e7bef700ffdc (patch) | |
tree | 8ae1a8d3fc86df304fe0f3fbf3fea8c31be97825 /makechrootpkg.in | |
parent | f2ce2d578e61fdc07c7e41e04eb691a347775c91 (diff) |
-rw-r--r-- | makechrootpkg.in | 13 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index e9859e1..0c21ed5 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -201,6 +201,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 { |