From 01282c3e9ecb1aff1afd58d53f83f4a98ea934a6 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 26 Jan 2020 15:58:59 +0100 Subject: initramfs-ostree-image: drop image_repo_manifest from IMAGE_CLASSES We should remove image_repo_manifest from IMAGE_CLASSES instead of dropping buildinfo_manifest from IMAGE_PREPROCESS_COMMAND, which would ensure the entire class not to be inherited. Signed-off-by: Ming Liu --- recipes-core/images/initramfs-ostree-image.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb index 7e03f3d..936c59a 100644 --- a/recipes-core/images/initramfs-ostree-image.bb +++ b/recipes-core/images/initramfs-ostree-image.bb @@ -13,6 +13,8 @@ IMAGE_LINGUAS = "" LICENSE = "MIT" +IMAGE_CLASSES_remove = "image_repo_manifest" + IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" # Avoid circular dependencies @@ -28,5 +30,3 @@ IMAGE_ROOTFS_EXTRA_SPACE = "0" IMAGE_OVERHEAD_FACTOR = "1.0" BAD_RECOMMENDATIONS += "busybox-syslog" - -IMAGE_PREPROCESS_COMMAND_remove = "buildinfo_manifest;" -- cgit v1.2.3-54-g00ecf From 3a2fecfc1d78e4b161f7180f35fc7d0a1a967ae6 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 26 Jan 2020 22:14:20 +0100 Subject: meta: move HOSTTOOLS definitions to sota.conf.inc HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being handled in base_eventhandler, so they must be defined in config files or in INHERIT classes or classes being inherited by base.bbclass, or else we might run into the following problems: ``` $ bitbake pkgname $ bitbake imgname ``` the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for instance, 'repo python' in image_repo_manifest.bbclass, they would not be copied to HOSTTOOLS_DIR. Signed-off-by: Ming Liu --- classes/image_repo_manifest.bbclass | 2 -- classes/sota.bbclass | 2 -- classes/target_version_example.bbclass | 2 -- conf/distro/sota.conf.inc | 3 ++- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 0b311bd..72dc28f 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -9,8 +9,6 @@ # For more information, see: # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests -HOSTTOOLS_NONFATAL += "repo python" - # Write build information to target filesystem buildinfo_manifest () { if [ $(which repo) ]; then diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 7bf17a4..71bd303 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -1,7 +1,5 @@ DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" -HOSTTOOLS_NONFATAL += "java" - SOTA_CLIENT ??= "aktualizr" SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" SOTA_DEPLOY_CREDENTIALS ?= "1" diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass index ef119fb..c0b5aec 100644 --- a/classes/target_version_example.bbclass +++ b/classes/target_version_example.bbclass @@ -1,7 +1,5 @@ # Writes target version to be used by garage-sign -HOSTTOOLS += " git " - deploy_target_version () { version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index 69d729c..9804694 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc @@ -17,4 +17,5 @@ INHERIT += "reproducible_build_simple" export SOURCE_DATE_EPOCH = "0" REPRODUCIBLE_TIMESTAMP_ROOTFS = "0" -HOSTTOOLS_append = " sync sha256sum" +HOSTTOOLS += "git sync sha256sum" +HOSTTOOLS_NONFATAL += "java repo python" -- cgit v1.2.3-54-g00ecf