validate_arch

This commit is contained in:
Alexander Stefanov 2019-04-05 02:24:10 +03:00
parent b57e168f43
commit 5b1c8f65fd

View file

@ -417,12 +417,9 @@ fi
validate_arch() { validate_arch() {
# check if spec file have set ExcludeArch or ExclusiveArch against build arch target # check if spec file have set ExcludeArch or ExclusiveArch against build arch target
BUILD_TYPE=`grep -i '^excludearch:.*$\|^exclusivearch:.*$' *.spec | awk -F'[:]' '{print $1}'` BUILD_TYPE=`grep -i '^excludearch:.*$\|^exclusivearch:.*$' *.spec | awk -F'[:]' '{print $1}'`
# check if spec file have both ExcludeArch and ExclusiveArch set up # check if spec file have both ExcludeArch and ExclusiveArch set up
[[ ${#BUILD_TYPE} -gt 15 ]] && echo "Spec file has set ExcludeArch and ExclusiveArch. Exiting!" && exit 1 [[ ${#BUILD_TYPE} -gt 15 ]] && echo "Spec file has set ExcludeArch and ExclusiveArch. Exiting!" && exit 1
SPEC_ARCH=(`grep -i '^excludearch:.*$\|^exclusivearch:.*$' *.spec | awk -F'[[:blank:]]' '{$1="";print $0}' | sort -u`) SPEC_ARCH=(`grep -i '^excludearch:.*$\|^exclusivearch:.*$' *.spec | awk -F'[[:blank:]]' '{$1="";print $0}' | sort -u`)
# validate platform against spec file settings # validate platform against spec file settings
validate_build() { validate_build() {
local _PLATFORM=($1) local _PLATFORM=($1)
@ -443,9 +440,7 @@ validate_arch() {
else else
echo "--> Spec validated for ExcludeArch and ExclusiveArch. Continue building." echo "--> Spec validated for ExcludeArch and ExclusiveArch. Continue building."
fi fi
} }
# translate arch into various options that may be set up in spec file # translate arch into various options that may be set up in spec file
case ${PLATFORM_ARCH,,} in case ${PLATFORM_ARCH,,} in
armv7hl) armv7hl)
@ -506,7 +501,7 @@ pushd ${HOME}/${PACKAGE}
find_spec find_spec
# check for excludearch or exclusivearch # check for excludearch or exclusivearch
# rework me # rework me
#validate_arch validate_arch
# download sources from .abf.yml # download sources from .abf.yml
/bin/bash /mdv/download_sources.sh /bin/bash /mdv/download_sources.sh
popd popd