Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-08-03 12:31:54 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-08-04 12:04:57 -0400
commitba657e4a5557c6b4dc86cfaa12c4920650a232d4 (patch)
treec7538e56cd7d24ec5099b88f588aa5f222766427 /makechrootpkg.in
parent6d4c23fcfded77af2e189656fcb79666566e3119 (diff)
makechrootpkg: Create the source package when downloading sources, not building the binary package
Also, don't bother injecting "-$pkgarch" in to the source package filename.
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in21
1 files changed, 4 insertions, 17 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 0b4184b..c099a71 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -234,25 +234,10 @@ _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 --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; SRCEXT="${1}" makepkg "${@:2}" --allsource' -bash "$srcext" "$@" || return
sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
ret=$?
case $ret in
@@ -274,6 +259,8 @@ _chrootnamcap() {
# Usage: download_sources $copydir $makepkg_user
# Globals:
# - SRCDEST
+# - SRCPKGDEST
+# - PKGDEST
download_sources() {
local copydir=$1
local makepkg_user=$2
@@ -284,8 +271,8 @@ download_sources() {
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
- env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
- makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o ||
+ env SRCDEST="$SRCDEST" SRCPKGDEST="$SRCPKGDEST" PKGDEST="$PKGDEST" BUILDDIR="$builddir" \
+ makepkg --config="$copydir/etc/makepkg.conf" --allsource ||
die "Could not download sources."
# Clean up garbage from verifysource