swupd-image: Fix files ownership if IMAGE_BASENAME is not default
PATCH 1/1 swupd-image: Fix files ownership if IMAGE_BASENAME is not default
From: Piotr Figiel <[email protected]>
In case IMAGE_BASENAME is set on image recipe level the files ownership on target rootfs is incorrect for recipes inheriting swupd-image.bbclass. Depending on the context swupd-image.bbclass used either PN (PN_BASE) or IMAGE_BASENAME when generating path to pseudo shared state directory. This seems correct only when IMAGE_BASENAME is not set as it defaults to PN.
This patch resolves above problem.
Addresses [YOCTO #10108].
--- classes/swupd-image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupd-image.bbclass +1 -1
@@ -81,7 +81,7 @@ python () { # Because real image building via SWUPD_IMAGES can happen also after # the initial "bitbake <core image>" invocation, we have to keep that # pseudo database around and cannot delete it. - pseudo_state = d.expand('${TMPDIR}/work-shared/${PN_BASE}/pseudo') + pseudo_state = d.expand('${TMPDIR}/work-shared/${IMAGE_BASENAME}/pseudo') d.setVar('PSEUDO_LOCALSTATEDIR', pseudo_state) # Non mega virtual images must depend on the mega image having been
Signature · 1 line
1.9.1
Quoted 13 lines · Piotr Figiel
From: Piotr Figiel <[email protected]>
In case
IMAGE_BASENAMEis set on image recipe level the files ownership on
target rootfs is incorrect for recipes inheriting swupd- image.bbclass.
Depending on the context swupd-image.bbclass used either PN (PN_BASE) orIMAGE_BASENAMEwhen generating path to pseudo shared state directory. This
seems correct only whenIMAGE_BASENAMEis not set as it defaults to PN.
Quoted 3 lines
This patch resolves above problem.
Addresses [YOCTO #10108].
Good catch, thanks! Patch pushed to meta-swupd master.
Joshua
Quoted 28 lines
Signed-off-by Piotr Figiel <[email protected]>---
classes/swupd-image.bbclass | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)classes/swupd- renamed from classes/swupd-image.bbclass +0
-0image.bbclass
index 08ab3f5..ed9bd24 100644classes/swupd-image.bbclass +0
-0@@ -81,7 +81,7 @@ python () { # Because real image building via SWUPD_IMAGES can happenalso after
# the initial "bitbake <core image>" invocation, we have to keep that # pseudo database around and cannot delete it. - pseudo_state = d.expand('${TMPDIR}/work- shared/${PN_BASE}/pseudo') + pseudo_state = d.expand('${TMPDIR}/work- shared/${IMAGE_BASENAME}/pseudo') d.setVar('PSEUDO_LOCALSTATEDIR', pseudo_state) # Non mega virtual images must depend on the mega image having been -- 1.9.1