mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 23:11:07 +02:00
eclass/coreos-kernel.eclass: Verify enablement of kconfig options
If any kconfig options are set to "y" or "m" in the defconfig or commonconfig, but are set to "n" after "make olddefconfig" runs, fail the build.
This commit is contained in:
parent
7c9b046060
commit
690c369cbe
@ -214,6 +214,23 @@ coreos-kernel_src_configure() {
|
||||
# Use default for any options not explitly set in defconfig
|
||||
kmake olddefconfig
|
||||
|
||||
# Verify that olddefconfig has not converted any y or m options to n
|
||||
# (implying a new, disabled dependency). Allow options to be converted
|
||||
# from m to y.
|
||||
#
|
||||
# generate regexes from enabled boolean/tristate options |
|
||||
# filter them out of the defconfig |
|
||||
# filter for boolean/tristate options, and format |
|
||||
# sort (why not)
|
||||
local missing=$( \
|
||||
gawk -F = '/=[ym]$/ {print "^" $1 "="}' "${S}/build/.config" | \
|
||||
grep -vf - "${S}/build/.config.old" | \
|
||||
gawk -F = '/=[ym]$/ {print " " $1}' | \
|
||||
sort)
|
||||
if [[ -n "${missing}" ]]; then
|
||||
die "Requested options not enabled in build:\n${missing}"
|
||||
fi
|
||||
|
||||
# For convenience, generate a minimal defconfig of the build
|
||||
kmake savedefconfig
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user