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> | 2017-02-15 14:40:06 -0500 |
commit | 22da1ef5087e7065439e23187f0984148a905fff (patch) | |
tree | 36ed88f8ad25186d18bd4a9adcc57750bda1363c /makechrootpkg.in | |
parent | c8300c3ff1afc667aa53f1782846902752687357 (diff) |
-rw-r--r-- | makechrootpkg.in | 11 |
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 } |