scripts: target_config_lib: add aliases for virtual default packages
OpenWrt's default package list contains the package "nftables", which is a virtual package provided by "nftables-json" and "nftables-nojson". Explicitly handle this case, otherwise our config check will fail when we extend our default package list with the one from OpenWrt.
This commit is contained in:
parent
a01818f6d2
commit
ca21952737
@ -123,6 +123,14 @@ local enabled_packages = {}
|
|||||||
-- Arguments: package name and config value (true: y, nil: m, false: unset)
|
-- Arguments: package name and config value (true: y, nil: m, false: unset)
|
||||||
-- Ensures precedence of y > m > unset
|
-- Ensures precedence of y > m > unset
|
||||||
local function config_package(pkg, v)
|
local function config_package(pkg, v)
|
||||||
|
-- HACK: Handle virtual default packages
|
||||||
|
local subst = {
|
||||||
|
nftables = 'nftables-nojson'
|
||||||
|
}
|
||||||
|
if subst[pkg] then
|
||||||
|
pkg = subst[pkg]
|
||||||
|
end
|
||||||
|
|
||||||
if v == false then
|
if v == false then
|
||||||
if not enabled_packages[pkg] then
|
if not enabled_packages[pkg] then
|
||||||
lib.try_config('PACKAGE_' .. pkg, false)
|
lib.try_config('PACKAGE_' .. pkg, false)
|
||||||
|
Loading…
Reference in New Issue
Block a user