Skip to content

Commit

Permalink
image: set convenience variables in bitbake code
Browse files Browse the repository at this point in the history
Moving these variable assignments from Python code into regular
bitbake variables gives us tracking of their dependencies in signatures.

Signed-off-by: Adriaan Schmidt <[email protected]>
  • Loading branch information
adriaan42 authored and amikan committed Jul 26, 2022
1 parent c535a3f commit 6c50294
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions meta/classes/image.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ IMGCLASSES = "imagetypes imagetypes_wic imagetypes_vm imagetypes_container"
IMGCLASSES += "${IMAGE_CLASSES}"
inherit ${IMGCLASSES}

# convenience variables to be used by CMDs
IMAGE_FILE_HOST = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.${type}"
IMAGE_FILE_CHROOT = "${PP_DEPLOY}/${IMAGE_FULLNAME}.${type}"
SUDO_CHROOT = "sudo chroot ${BUILDCHROOT_DIR}"

# hook up IMAGE_CMD_*
python() {
image_types = (d.getVar('IMAGE_FSTYPES') or '').split()
Expand Down Expand Up @@ -217,11 +222,6 @@ python() {
if any([d.getVar(arg) is None for arg in required_args]):
bb.fatal("IMAGE_TYPE '%s' requires these arguments: %s" % (image_type, ', '.join(required_args)))

# convenience variables to be used by CMDs
localdata.setVar('IMAGE_FILE_HOST', '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.${type}')
localdata.setVar('IMAGE_FILE_CHROOT', '${PP_DEPLOY}/${IMAGE_FULLNAME}.${type}')
localdata.setVar('SUDO_CHROOT', localdata.expand('sudo chroot ${BUILDCHROOT_DIR}'))

# imager install
for dep in (d.getVar('IMAGER_INSTALL_' + bt_clean) or '').split():
imager_install.add(dep)
Expand Down

0 comments on commit 6c50294

Please sign in to comment.