From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v3 1/6] image: Support multiple image types in WORKDIR and STAMPS
Date: Fri, 19 Nov 2021 10:14:55 +0100 [thread overview]
Message-ID: <20211119091500.12341-2-ubely@ilbers.de> (raw)
In-Reply-To: <20211119091500.12341-1-ubely@ilbers.de>
If we want to support several image types listed in IMAGE_TYPE,
we should consider this part in WORKDIR, STAMP and STAMPCLEAN.
The solution is to replace spaces with underscores
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/classes/image.bbclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 5a0f32e4..2d060704 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -1,10 +1,12 @@
# This software is a part of ISAR.
# Copyright (C) 2015-2017 ilbers GmbH
+# Replace possible multiple spaces with single underscores
+IMAGE_SUFFIX = "${@'_'.join(d.getVar("IMAGE_TYPE", True).split())}"
# Make workdir and stamps machine-specific without changing common PN target
-WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_TYPE}/${PV}-${PR}"
-STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_TYPE}/${PV}-${PR}"
-STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_TYPE}/*-*"
+WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/${PV}-${PR}"
+STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/${PV}-${PR}"
+STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/*-*"
IMAGE_INSTALL ?= ""
IMAGE_TYPE ?= "ext4-img"
--
2.20.1
next prev parent reply other threads:[~2021-11-19 9:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 9:14 [PATCH v3 0/6] Support multiple image types in one build Uladzimir Bely
2021-11-19 9:14 ` Uladzimir Bely [this message]
2021-11-19 9:14 ` [PATCH v3 2/6] wic-img: Set weak default value for WKS_FILE Uladzimir Bely
2021-11-19 9:14 ` [PATCH v3 3/6] start_vm: Use the first image type to start VM Uladzimir Bely
2021-11-19 9:14 ` [PATCH v3 4/6] multiconfig: Add ext4-img type to qemuamd64-buster multiconfig Uladzimir Bely
2021-11-19 9:14 ` [PATCH v3 5/6] doc: Update docs to fit new IMAGE_TYPE meaning Uladzimir Bely
2021-11-19 9:15 ` [PATCH v3 6/6] api: Rename IMAGE_TYPE to IMAGE_FSTYPES Uladzimir Bely
2021-12-01 13:24 ` [PATCH v3 0/6] Support multiple image types in one build Anton Mikanovich
-- strict thread matches above, loose matches on Subject: below --
2021-11-19 9:09 [PATCH v3 0/6] Uladzimir Bely
2021-11-19 9:09 ` [PATCH v3 1/6] image: Support multiple image types in WORKDIR and STAMPS Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211119091500.12341-2-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox