offload-build: take makepkg.conf from devtools for appropriate packagelist
This fixes an issue with the usage of makepkg --packagelist to get the produced artifacts filenames according to the PKGEXT used in devtools' makepkg.conf instead of the one defined in pacman. One goal we want to preserve is that devtools configuration should be self contained and not require any editing of non owned files like the host /etc/makepkg.conf to produce expected results. Additionally modify the archbuild_cmd override for multilib builds to use an independent variable and not fiddle with the actual arch variable to select the appropriate cmd.
This commit is contained in:
parent
9b4d8ae930
commit
57fb44b976
|
@ -74,11 +74,12 @@ while (( $# )); do
|
||||||
done
|
done
|
||||||
|
|
||||||
# multilib must be handled specially
|
# multilib must be handled specially
|
||||||
|
archbuild_arch="${arch}"
|
||||||
if [[ $repo = multilib* ]]; then
|
if [[ $repo = multilib* ]]; then
|
||||||
arch=
|
archbuild_arch=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
archbuild_cmd=("${repo}${arch:+-$arch}-build" "$@")
|
archbuild_cmd=("${repo}${archbuild_arch:+-$archbuild_arch}-build" "$@")
|
||||||
|
|
||||||
trap 'rm -rf $SRCPKGDEST' EXIT INT TERM QUIT
|
trap 'rm -rf $SRCPKGDEST' EXIT INT TERM QUIT
|
||||||
|
|
||||||
|
@ -108,7 +109,11 @@ mapfile -t files < <(
|
||||||
printf "%s\n" "" "-> build complete" &&
|
printf "%s\n" "" "-> build complete" &&
|
||||||
printf "\t%s\n" "$temp"/*
|
printf "\t%s\n" "$temp"/*
|
||||||
} >&2 &&
|
} >&2 &&
|
||||||
makepkg --packagelist
|
makepkg_config="/usr/share/devtools/makepkg-'"${arch}"'.conf" &&
|
||||||
|
if [[ -f /usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||||
|
makepkg_config="/usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf"
|
||||||
|
fi &&
|
||||||
|
makepkg --config "${makepkg_config}" --packagelist
|
||||||
')
|
')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue