Merge pull request #6457 from lrusak/kernel_check_string

scripts/check_kernel_config: handle string options
This commit is contained in:
Christian Hewitt 2022-05-09 07:18:24 +04:00 committed by GitHub
commit a80860639d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -179,7 +179,7 @@ pre_make_target() {
continue
fi
if [ "$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})" != "${OPTION##*=}" ]; then
if [ "$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})" != "$(echo ${OPTION##*=} | tr -d '"')" ]; then
MISSING_KERNEL_OPTIONS+="\t${OPTION}\n"
fi
done < ${DISTRO_DIR}/${DISTRO}/kernel_options

View File

@ -26,6 +26,12 @@ if [ -f "${DISTRO_DIR}/${DISTRO}/kernel_options" ]; then
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --disable ${OPTION%%=*}
fi
# must be a string if it contains double quotes
if [ -n "$(echo ${OPTION##*=} | grep '"')" ]; then
echo "[${OPTION##*=}] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --set-str ${OPTION%%=*} $(echo ${OPTION##*=} | tr -d '"')
fi
done < ${DISTRO_DIR}/${DISTRO}/kernel_options
else
echo "kernel options file doesn't exist: ${DISTRO_DIR}/${DISTRO}/kernel_options"