diff options
author | 2016-04-13 14:40:38 +0100 | |
---|---|---|
committer | 2016-04-13 14:42:04 +0100 | |
commit | aa4855b034fa3875b13e4c00a6720b8268b5a60c (patch) | |
tree | 6502f36f06aad1868df152c179ab19a5504de28b | |
parent | 3a7af4b83b40928cc5d4112b3c61c5ed6a8bad58 (diff) | |
download | meta-swupd-aa4855b034fa3875b13e4c00a6720b8268b5a60c.tar.gz meta-swupd-aa4855b034fa3875b13e4c00a6720b8268b5a60c.tar.bz2 meta-swupd-aa4855b034fa3875b13e4c00a6720b8268b5a60c.zip |
swupd-image: also reserve the bundle name full
swupd generates and uses a Manifest.full which is a complete manifest
of all files in all bundles of the OS.
Therefore we should prevent users defining a bundle named 'full' as
this would also generate a Manifest.full file and confuse future use
of swupd.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-rw-r--r-- | classes/swupd-image.bbclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass index 7b0a7a1..73456be 100644 --- a/classes/swupd-image.bbclass +++ b/classes/swupd-image.bbclass @@ -121,8 +121,19 @@ python () { bundles = (d.getVar('SWUPD_BUNDLES', True) or "").split() extended = (d.getVar('BBCLASSEXTEND', True) or "").split() - if 'mega' in bundles: - bb.error('SWUPD_BUNDLES contains an item named "mega", this is a reserved name. Please rename that bundle.') + # We need to prevent the user defining bundles where the name might clash + # with naming in meta-swupd and swupd itself: + # * mega is the name of our super image, an implementation detail in + # meta-swupd + # * full is the name used by swupd for the super manifest (listing all + # files in all bundles of the OS) + def check_reserved_name(name): + reserved_bundles = ['mega', 'full'] + if name in reserved_bundles: + bb.error('SWUPD_BUNDLES contains an item named "%s", this is a reserved name. Please rename that bundle.' % name) + + for bndl in bundles: + check_reserved_name(bndl) # Generate virtual images for each of the bundles, the base image + the # bundle contents. Add each virtual image's do_prune_bundle task as a |