Skip to content

Commit

Permalink
classes: bundle: add WORKDIR also to regular image search space
Browse files Browse the repository at this point in the history
We already have a look at WORKDIR when searching for
RAUC_BUNDLE_EXTRA_FILES artifacts.
Doing the same for images too will potential allow generating required
artifacts right from the bundle recipe run and use them as images to be
copied to BUNDLE_DIR.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
  • Loading branch information
ejoerns committed Oct 21, 2020
1 parent d95f2ff commit abbd499
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/bundle.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,13 @@ def write_manifest(d):
if os.path.isfile(searchpath):
shutil.copy(searchpath, bundle_imgpath)
else:
raise bb.fatal("Failed adding image '%s' to bundle: not present in DEPLOY_DIR_IMAGE" % imgsource)
searchpath = d.expand("${WORKDIR}/%s") % imgsource
if os.path.isfile(searchpath):
shutil.copy(searchpath, bundle_imgpath)
else:
raise bb.fatal('Failed to find source %s' % imgsource)
if not os.path.exists(bundle_imgpath):
raise bb.fatal("Failed adding image '%s' to bundle: not present in DEPLOY_DIR_IMAGE or WORKDIR" % imgsource)

manifest.close()

Expand Down

0 comments on commit abbd499

Please sign in to comment.