diff options
-rw-r--r-- | classes/swupdbundle.bbclass | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/classes/swupdbundle.bbclass b/classes/swupdbundle.bbclass index 986b80d..f008737 100644 --- a/classes/swupdbundle.bbclass +++ b/classes/swupdbundle.bbclass @@ -35,6 +35,13 @@ python swupdbundle_virtclass_handler () { pn = 'bundle-' + pn + '-' + bundle e.data.setVar("PN", pn) e.data.setVar("BUNDLE_NAME", bundle) + # -dev bundles enable the dev-pkgs image feature for the bundle they are derived from, + # i.e. they have the same content of the base but also the development files. + if bundle.endswith('-dev'): + basebundle = bundle[0:-len('-dev')] + d.appendVar('IMAGE_FEATURES', ' dev-pkgs') + else: + basebundle = bundle # Not producing any real images, only the rootfs directory. e.data.setVar("IMAGE_FSTYPES", "") @@ -45,14 +52,24 @@ python swupdbundle_virtclass_handler () { if contents: return contents.split() else: - bb.fatal('BUNDLE_CONTENTS[%s] is not set, this should list the packages to be included in the bundle.' % bndl) + bb.fatal('%s/%s: BUNDLE_CONTENTS[%s] is not set, this should list the packages to be included in the bundle.' % (basebundle, bundle, bndl)) if bundle == 'mega': bundles = (e.data.getVar('SWUPD_BUNDLES', True) or "").split() + # If any of our bundles contains development files, we also need + # to enable that for the mega image. + dodev = False for bndl in bundles: - curr_install += get_bundle_contents(bndl) + if bndl.endswith('-dev'): + basebndl = bndl[0:-len('-dev')] + dodev = True + else: + basebndl = bndl + curr_install += get_bundle_contents(basebndl) + if dodev: + d.appendVar('IMAGE_FEATURES', ' dev-pkgs') else: - curr_install += get_bundle_contents(bundle) + curr_install += get_bundle_contents(basebundle) e.data.setVar('IMAGE_INSTALL', ' '.join(curr_install)) } |