build: target_config_lib: introduce concat_list helper
This commit is contained in:
parent
9be7a5cad7
commit
0fd5905fc2
@ -49,14 +49,17 @@ local function append_to_list(list, item, keep_neg)
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
local function compact_list(list, keep_neg)
|
local function concat_list(a, b, keep_neg)
|
||||||
local ret = {}
|
local ret = a
|
||||||
for _, el in ipairs(list) do
|
for _, el in ipairs(b) do
|
||||||
ret = append_to_list(ret, el, keep_neg)
|
ret = append_to_list(ret, el, keep_neg)
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function compact_list(list, keep_neg)
|
||||||
|
return concat_list({}, list, keep_neg)
|
||||||
|
end
|
||||||
|
|
||||||
local function site_vars(var)
|
local function site_vars(var)
|
||||||
return lib.exec_capture_raw(string.format(
|
return lib.exec_capture_raw(string.format(
|
||||||
@ -178,9 +181,7 @@ else
|
|||||||
-- x86 fallback: no devices
|
-- x86 fallback: no devices
|
||||||
local target_pkgs = {}
|
local target_pkgs = {}
|
||||||
local function handle_pkgs(pkgs)
|
local function handle_pkgs(pkgs)
|
||||||
for _, pkg in ipairs(pkgs) do
|
target_pkgs = concat_list(target_pkgs, pkgs)
|
||||||
target_pkgs = append_to_list(target_pkgs, pkg)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Just hardcode the class for device-less targets to 'standard'
|
-- Just hardcode the class for device-less targets to 'standard'
|
||||||
|
Loading…
Reference in New Issue
Block a user