Commit 36dc5d87 authored by Jan Steffens's avatar Jan Steffens
Browse files

Stop the PACKAGER= and MAKEFLAGS= from piling on

Repeatedly reusing the same chroot kept adding lines to makepkg.conf.
parent 96f22cfe
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -161,9 +161,15 @@ if ! grep 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then
	echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf"
fi
[ -z "${MAKEFLAGS}" ] && eval $(grep '^MAKEFLAGS=' /etc/makepkg.conf)
[ -n "${MAKEFLAGS}" ] && echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf"
if [ -n "${MAKEFLAGS}" ]; then 
  sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf"
  echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf"
fi
[ -z "${PACKAGER}" ] && eval $(grep '^PACKAGER=' /etc/makepkg.conf)
[ -n "${PACKAGER}" ] && echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
if [ -n "${PACKAGER}" ]; then 
  sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
  echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi

# Set target CARCH as it might be used within the PKGBUILD to select correct sources
eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf")