Prefer flags over config file, again

This commit is contained in:
Piotr Wójcik 2020-09-09 23:20:27 +02:00 committed by Daniel Kolesa
parent da1089042f
commit 46cb66d525

View file

@ -162,11 +162,14 @@ set_build_options() {
fi fi
for f in ${build_options}; do for f in ${build_options}; do
_pkgname=${pkgname//[^A-Za-z0-9_]/_} # Select build options from conf
eval pkgopts="\$XBPS_PKG_OPTIONS_${_pkgname}" export XBPS_CURRENT_PKG=${pkgname}
if [ -z "$pkgopts" -o "$pkgopts" = "" ]; then pkgopts="$(
pkgopts=${XBPS_PKG_OPTIONS} . $XBPS_CONFIG_FILE 2>/dev/null
fi var="XBPS_PKG_OPTIONS_${XBPS_CURRENT_PKG//[^A-Za-z0-9_]/_}"
echo ${!var:-${XBPS_PKG_OPTIONS}}
)"
unset XBPS_CURRENT_PKG
# If pkg options were set in config(s), merge them with command line # If pkg options were set in config(s), merge them with command line
if [ -n "$XBPS_ARG_PKG_OPTIONS" ]; then if [ -n "$XBPS_ARG_PKG_OPTIONS" ]; then
@ -336,8 +339,6 @@ setup_pkg() {
unset_package_funcs unset_package_funcs
. $XBPS_CONFIG_FILE 2>/dev/null
if [ -n "$cross" ]; then if [ -n "$cross" ]; then
source_file $XBPS_CROSSPFDIR/${cross}.sh source_file $XBPS_CROSSPFDIR/${cross}.sh