aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-08-10 11:55:09 +0100
committerJoshua Lock <joshua.g.lock@intel.com>2016-08-10 11:55:16 +0100
commitaa947169e9abcd5ce775cfb06dc9b92a64290b0d (patch)
tree101dad6ea52df813e1a4672011cede17a77c52c8
parent6329c108edd34b975255103238657594c16b49e9 (diff)
downloadmeta-swupd-aa947169e9abcd5ce775cfb06dc9b92a64290b0d.tar.gz
meta-swupd-aa947169e9abcd5ce775cfb06dc9b92a64290b0d.tar.bz2
meta-swupd-aa947169e9abcd5ce775cfb06dc9b92a64290b0d.zip
swupd.rootfs: handle empty SWUPD_BUNDLES in create_rootfs
If the user hasn't defined any bundles a mega-image won't be created and there's no need to recopy the mega image rootfs. The original rootfs can be used in this case. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-rw-r--r--lib/swupd/rootfs.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/swupd/rootfs.py b/lib/swupd/rootfs.py
index d837acf..307044d 100644
--- a/lib/swupd/rootfs.py
+++ b/lib/swupd/rootfs.py
@@ -25,6 +25,11 @@ def create_rootfs(d):
bb.debug(2, "Skipping swupd_create_rootfs() in bundle image %s for bundle %s." % (pn, bndl))
return
+ havebundles = (d.getVar('SWUPD_BUNDLES', True) or '') != ''
+ if not havebundles:
+ bb.debug(2, 'Skipping swupd_create_rootfs(), original rootfs can be used as no additional bundles are defined')
+ return
+
# Sanity checking was already done in swupdimage.bbclass.
# Here we can simply use the settings.
imagebundles = d.getVarFlag('SWUPD_IMAGES', imageext, True).split() if imageext else []