makechrootpkg: accept arguments useful to verifysource

And pass them on to download_sources outside the chroot.

Fixes FS#35652

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
This commit is contained in:
Eli Schwartz 2019-03-28 18:04:32 -04:00 committed by Levente Polyak
parent f6f4da26cb
commit 5fcd90a212
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,7 @@ shopt -s nullglob
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
makepkg_args=("${default_makepkg_args[@]}")
verifysource_args=()
chrootdir=
passeddir=
makepkg_user=
@ -253,7 +254,7 @@ download_sources() {
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o ||
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" ||
die "Could not download sources."
}
@ -327,9 +328,10 @@ makepkg_args+=("${@:$OPTIND}")
# See if -R or -e was passed to makepkg
for arg in "${@:$OPTIND}"; do
case ${arg%%=*} in
--repackage|--noextract) keepbuilddir=1; break ;;
--skip*|--holdver) verifysource_args+=("$arg") ;;
--repackage|--noextract) keepbuilddir=1 ;;
--*) ;;
-*R*|-*e*) keepbuilddir=1; break ;;
-*R*|-*e*) keepbuilddir=1 ;;
esac
done