Skip to content

Commit

Permalink
image_types_ostree.bbclass, image_types_ota.bbclass: convert CONVERSI…
Browse files Browse the repository at this point in the history
…ON_CMD and IMAGE_TYPEDEP as well

* for honister this depends on new changes in oe-core:
  https://git.openembedded.org/openembedded-core/commit/?id=52674c4b1fdf79829095031b2e342d44fb0dc181
  https://git.openembedded.org/openembedded-core/commit/?id=8573f6b2a7af9867da0b21936ffd2cd2a417de1d
  for dunfell, gatesgarth, hardknott the colons will be replaced with underscores by bitbake
  and everything will work as before

Signed-off-by: Martin Jansa <[email protected]>
  • Loading branch information
shr-project committed Aug 5, 2021
1 parent cfff200 commit f46d8ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions classes/image_types_ostree.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BUILD_OSTREE_TARBALL ??= "1"
SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd', 'true', '')}"

IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]"
CONVERSION_CMD:tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]"
CONVERSIONTYPES:append = " tar"

TAR_IMAGE_ROOTFS:task-image-ostree = "${OSTREE_ROOTFS}"
Expand Down Expand Up @@ -126,7 +126,7 @@ IMAGE_CMD:ostree () {
cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest
}

IMAGE_TYPEDEP_ostreecommit = "ostree"
IMAGE_TYPEDEP:ostreecommit = "ostree"
do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot"
do_image_ostreecommit[lockfiles] += "${OSTREE_REPO}/ostree.lock"
IMAGE_CMD:ostreecommit () {
Expand All @@ -151,7 +151,7 @@ IMAGE_CMD:ostreecommit () {
fi
}

IMAGE_TYPEDEP_ostreepush = "ostreecommit"
IMAGE_TYPEDEP:ostreepush = "ostreecommit"
do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot"
do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock"
IMAGE_CMD:ostreepush () {
Expand All @@ -177,7 +177,7 @@ IMAGE_CMD:ostreepush () {
fi
}

IMAGE_TYPEDEP_garagesign = "ostreepush"
IMAGE_TYPEDEP:garagesign = "ostreepush"
do_image_garagesign[depends] += "unzip-native:do_populate_sysroot"
# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using
# garage-sign simultaneously for two images often causes problems.
Expand Down Expand Up @@ -269,7 +269,7 @@ IMAGE_CMD:garagesign () {
fi
}

IMAGE_TYPEDEP_garagecheck = "garagesign"
IMAGE_TYPEDEP:garagecheck = "garagesign"
IMAGE_CMD:garagecheck () {
if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
# if credentials are issued by a server that doesn't support offline signing, exit silently
Expand Down
4 changes: 2 additions & 2 deletions classes/image_types_ota.bbclass
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OTA_SYSROOT = "${WORKDIR}/ota-sysroot"
TAR_IMAGE_ROOTFS:task-image-ota = "${OTA_SYSROOT}"
IMAGE_TYPEDEP_ota = "ostreecommit"
IMAGE_TYPEDEP:ota = "ostreecommit"
do_image_ota[dirs] = "${OTA_SYSROOT}"
do_image_ota[cleandirs] = "${OTA_SYSROOT}"
do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \
Expand Down Expand Up @@ -78,7 +78,7 @@ IMAGE_CMD:ota () {
}

EXTRA_IMAGECMD:ota-ext4 = "-L otaroot -i 4096 -t ext4"
IMAGE_TYPEDEP_ota-ext4 = "ota"
IMAGE_TYPEDEP:ota-ext4 = "ota"
IMAGE_ROOTFS:task-image-ota-ext4 = "${OTA_SYSROOT}"
IMAGE_CMD:ota-ext4 () {
ln -sf ${STAGING_DIR_NATIVE}${base_sbindir_native}/mkfs.ext4 ${STAGING_DIR_NATIVE}${base_sbindir_native}/mkfs.ota-ext4
Expand Down

0 comments on commit f46d8ef

Please sign in to comment.