Compare commits

..

2 Commits

Author SHA1 Message Date
Junxuan Liao
fee1f6b226 Merge branch 'master' into 'master'
fix(makechrootpkg): add environmental variables to verifysource_args

Closes #197

See merge request archlinux/devtools!217
2025-07-30 21:24:34 +00:00
Liao Junxuan
15d920765a fix(makechrootpkg): add environmental variables to verifysource_args
This is useful for setting proxies for downloading files. Fixes #197.
2025-07-22 04:45:30 +00:00
2 changed files with 10 additions and 7 deletions

View File

@@ -94,19 +94,19 @@ pkgctl_license_check() {
pushd "${path}" >/dev/null
if [[ ! -f PKGBUILD ]]; then
msg_error "${BOLD}${path}:${ALL_OFF} no PKGBUILD found"
msg_error "${BOLD}${pkgbase}:${ALL_OFF} no PKGBUILD found"
return 1
fi
if [[ ! -f .SRCINFO ]]; then
msg_error "${BOLD}${path}:${ALL_OFF} no .SRCINFO found"
return 1
fi
# reset common PKGBUILD variables
unset pkgbase
if ! pkgbase=$(grep --max-count=1 --extended-regexp "pkgbase = (.+)" .SRCINFO | awk '{print $3}'); then
msg_error "${BOLD}${path}:${ALL_OFF} pkgbase not found in .SRCINFO"
# shellcheck source=contrib/makepkg/PKGBUILD.proto
if ! . ./PKGBUILD; then
msg_error "${BOLD}${pkgbase}:${ALL_OFF} failed to source PKGBUILD"
return 1
fi
pkgbase=${pkgbase:-$pkgname}
if [[ ! -e LICENSE ]]; then
msg_error "${BOLD}${pkgbase}:${ALL_OFF} is missing the LICENSE file"

View File

@@ -345,6 +345,9 @@ for arg in "${@:$OPTIND}"; do
-*A*) verifysource_args+=(-A) ;;&
-*R*|-*e*) keepbuilddir=1 ;;&
esac
if [[ $arg != -* && $arg == *=* ]]; then
verifysource_args+=("$arg")
fi
done
umask 0022