diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-20 13:49:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-05-12 19:42:31 -0400 |
commit | 25d75d7eec155bea72cde437c00ba6b010b8c6ba (patch) | |
tree | cbda9383e6c7df8395e3e11cfd4792181233d6b5 /makechrootpkg.in | |
parent | 3a7edf091da1e9ef158500c8a07b73ce64750bcc (diff) | |
download | devtools32-25d75d7eec155bea72cde437c00ba6b010b8c6ba.tar.xz |
makechrootpkg: Also build --allsource packages.
It also sets SRCEXT="-$pkgarch$SRCEXT", so that two runs of makechrootpkg on
different architectures don't overwrite eachothers source packages.
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index 4985172..83eb787 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -272,10 +272,24 @@ _chrootprepare() { _chrootbuild() { # shellcheck source=/dev/null . /etc/profile + local srcext + srcext="$( + # shellcheck source=makepkg-x86_64.conf + . /etc/makepkg.conf || exit + # shellcheck source=PKGBUILD.proto + . /startdir/PKGBUILD || exit + if [ "$arch" = any ]; then + pkgarch=any + else + pkgarch=$CARCH + fi + printf '%s\n' "-$pkgarch$SRCEXT" + )" || return # Beware, there are some stupid arbitrary rules on how you can # use "$" in arguments to commands with "sudo -i". ${foo} or # ${1} is OK, but $foo or $1 isn't. # https://bugzilla.sudo.ws/show_bug.cgi?id=765 + sudo -iu builduser bash -c 'cd /startdir; SRCEXT="${1}" makepkg "${@:2}" --allsource' -bash "$srcext" "$@" || return sudo -iu builduser bash -c 'cd /startdir; makepkg "$@" --noextract --noprepare' -bash "$@" } |