Skip to contentSkip to conversation

swupd-image: Fix files ownership if IMAGE_BASENAME is not default

PATCH In review Piotr Figiel 2 participants 2 messages Aug 11, 2016 – Aug 12, 2016

lore
Share & tools
lore
#0 lore raw

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
index 08ab3f5..ed9bd24 100644
@@ -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
#1 lore raw
Quoted 13 lines · Piotr Figiel

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.

Quoted 3 lines

This patch resolves above problem.

Addresses [YOCTO #10108].

Good catch, thanks! Patch pushed to meta-swupd master.

Joshua

Quoted 28 lines

---
 classes/swupd-image.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupd- renamed from classes/swupd-image.bbclass +0 -0

image.bbclass
index 08ab3f5..ed9bd24 100644

classes/swupd-image.bbclass +0 -0
@@ -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
-- 
1.9.1