scripts: target_config_lib: fix inclusion of device-specific packages from site.mk

Fixes: 071cf7b20f ("Switch to Lua for target definitions")
This commit is contained in:
Matthias Schiffer 2019-09-14 13:46:56 +02:00
parent b113e0f517
commit 78054cddbf
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 5 additions and 5 deletions

View File

@ -16,15 +16,15 @@ return function(funcs)
end
local function site_packages(profile)
local function site_packages(image)
return lib.exec_capture_raw(string.format([[
MAKEFLAGS= make print PROFILE=%s --no-print-directory -s -f - <<'END_MAKE'
MAKEFLAGS= make print _GLUON_IMAGE_=%s --no-print-directory -s -f - <<'END_MAKE'
include $(GLUON_SITEDIR)/site.mk
print:
echo -n '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
echo -n '$(GLUON_$(_GLUON_IMAGE_)_SITE_PACKAGES)'
END_MAKE
]], lib.escape(profile)))
]], lib.escape(image)))
end
lib.include('generic')
@ -68,7 +68,7 @@ END_MAKE
for _, pkg in ipairs(dev.options.packages or {}) do
handle_pkg(pkg)
end
for pkg in string.gmatch(site_packages(profile), '%S+') do
for pkg in string.gmatch(site_packages(dev.image), '%S+') do
handle_pkg(pkg)
end