diff options
authorPatrick Ohly <patrick.ohly@intel.com>2016-04-06 08:50:16 +0200
committerJoshua Lock <joshua.g.lock@intel.com>2016-04-06 12:14:14 +0100
commit655e5af1b80938a2852b7c652c47810986e26a99 (patch)
parenta5f37adbd80f96e9ebff072cadb34978dc29b200 (diff)
swupd-image.bbclass: always update rootfs of base image
As a special optimization, updating the rootfs of the base image was skipped if actual image creation was disabled for the base image. However, there are reasons beyond image creation for updating the rootfs, for example to run QA checks on it. Therefore the change gets reverted and the code now only gets skipped for the virtual bundle recipes. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
1 files changed, 9 insertions, 5 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass
index 436ab2d..2a4ac00 100644
--- a/classes/swupd-image.bbclass
+++ b/classes/swupd-image.bbclass
@@ -185,14 +185,18 @@ fakeroot do_rootfs_append () {
def swupd_create_rootfs(d):
- imagefstypes = d.getVar('IMAGE_FSTYPES', d)
- if not imagefstypes:
- # Not producing real images, so there's no need to copy
- # files from the mega image.
- return
+ # Create or replace the do_image rootfs output with the corresponding
+ # subset from the mega rootfs. Done even if there is no actual image
+ # getting produced, because there may be QA tests defined for
+ # do_image which depend on seeing the actual rootfs that would be
+ # used for images.
+ bndl = d.getVar('BUNDLE_NAME', True)
pn = d.getVar('PN', True)
pn_base = d.getVar('PN_BASE', True)
imageext = d.getVar('IMAGE_BUNDLE_NAME', True) or ''
+ if bndl and bndl != 'os-core':
+ bb.debug(2, "Skipping swupd_create_rootfs() in bundle image %s for bundle %s." % (pn, bndl))
+ return
# Sanity checking was already done in swupdimage.bbclass.
# Here we can simply use the settings.