diff options
author | 2016-08-10 12:07:27 +0100 | |
---|---|---|
committer | 2016-08-10 12:26:02 +0100 | |
commit | 28d57e479994db5cb16f41ac2e89bbfc4137bf86 (patch) | |
tree | 3973c87687a63f271d2f36eaf7f23fa4bed9b36c | |
parent | aa947169e9abcd5ce775cfb06dc9b92a64290b0d (diff) | |
download | meta-swupd-28d57e479994db5cb16f41ac2e89bbfc4137bf86.tar.gz meta-swupd-28d57e479994db5cb16f41ac2e89bbfc4137bf86.tar.bz2 meta-swupd-28d57e479994db5cb16f41ac2e89bbfc4137bf86.zip |
swupd.bundles: handle empty SWUPD_BUNDLES in copy_core_contents
If SWUPD_BUNDLES is empty no mega-image will be built and there's
no need to try and copy the os-core bundle contents from there,
instead the original image rootfs should be used as the source of
the copy.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-rw-r--r-- | lib/swupd/bundles.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/swupd/bundles.py b/lib/swupd/bundles.py index cf096cf..81b32f9 100644 --- a/lib/swupd/bundles.py +++ b/lib/swupd/bundles.py @@ -66,8 +66,12 @@ def copy_core_contents(d): if f[1:] not in unwanted_files: bundle_file_contents.append(f[2:]) bb.debug(1, 'os-core contains %s items' % len(bundle_file_contents)) - bb.debug(1, "Copying from mega-image to os-core bundle dir (%s)" % (bundledir)) - swupd.path.copyxattrfiles(d, bundle_file_contents, d.getVar('MEGA_IMAGE_ROOTFS', True), bundledir) + havebundles = (d.getVar('SWUPD_BUNDLES', True) or '') != '' + imgrootfs = d.getVar('MEGA_IMAGE_ROOTFS', True) + if not havebundles: + imgrootfs = rootfs + bb.debug(1, "Copying from image (%s) to os-core bundle dir (%s)" % (imgrootfs, bundledir)) + swupd.path.copyxattrfiles(d, bundle_file_contents, imgrootfs, bundledir) def stage_package_bundle_contents(d, bundle): |