scripts: target_config_lib: remove handling for targets without devices

Another leftover from legacy OpenWrt targets, which we don't support
anymore.
This commit is contained in:
Matthias Schiffer 2022-08-23 21:41:03 +02:00
parent 16227efd5d
commit a01818f6d2
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -151,10 +151,9 @@ lib.include(target)
lib.check_devices() lib.check_devices()
if #lib.devices > 0 then handle_target_pkgs(lib.target_packages)
handle_target_pkgs(lib.target_packages)
for _, dev in ipairs(lib.devices) do for _, dev in ipairs(lib.devices) do
local device_pkgs = {} local device_pkgs = {}
local function handle_pkgs(pkgs) local function handle_pkgs(pkgs)
for _, pkg in ipairs(pkgs) do for _, pkg in ipairs(pkgs) do
@ -179,21 +178,6 @@ if #lib.devices > 0 then
'TARGET_DEVICE_PACKAGES_' .. profile_config, 'TARGET_DEVICE_PACKAGES_' .. profile_config,
table.concat(device_pkgs, ' ') table.concat(device_pkgs, ' ')
) )
end
else
-- x86 fallback: no devices
local target_pkgs = {}
local function handle_pkgs(pkgs)
target_pkgs = concat_list(target_pkgs, pkgs)
end
-- Just hardcode the class for device-less targets to 'standard'
-- - this is x86 only at the moment, and it will have devices
-- in OpenWrt 19.07 + 1 as well
handle_pkgs(lib.target_packages)
handle_pkgs(class_packages('standard'))
handle_target_pkgs(target_pkgs)
end end
return lib return lib