public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 1/4] isar: Fix mutli-distro builds in parallel
Date: Tue,  8 Aug 2017 13:04:21 +0300	[thread overview]
Message-ID: <20170808100424.19607-2-asmirnov@ilbers.de> (raw)
In-Reply-To: <20170808100424.19607-1-asmirnov@ilbers.de>

Extend stamp suffix to distinguish the same distro for various
architectures. This fixes parallel build for all possible
configurations.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 10 +++++-----
 meta/classes/dpkg.bbclass                        |  4 ++--
 meta/classes/ext4-img.bbclass                    |  2 +-
 meta/classes/image.bbclass                       |  2 +-
 meta/conf/isar-bitbake.conf                      |  3 +--
 meta/recipes-devtools/buildchroot/buildchroot.bb |  2 +-
 6 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 337c329..b679d97 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -17,11 +17,11 @@ DEPENDS += "${IMAGE_INSTALL}"
 IMAGE_PREINSTALL += "apt \
                      dbus"
 
-WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}"
+WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}/${DISTRO}"
 S = "${WORKDIR}/rootfs"
 IMAGE_ROOTFS = "${S}"
 
-do_rootfs[stamp-extra-info] = "${MACHINE}"
+do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 
 do_rootfs() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
@@ -38,9 +38,9 @@ do_rootfs() {
     sed -i 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_SUITE##|${DISTRO_SUITE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##CONFIG_SCRIPT##|./tmp/work/${PN}/${MACHINE}/configscript.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##SETUP_SCRIPT##|./tmp/work/${PN}/${MACHINE}/setup.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##DIR_HOOKS##|./tmp/work/${PN}/${MACHINE}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##CONFIG_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/configscript.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##SETUP_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/setup.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##DIR_HOOKS##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
 
     # Multistrap config use relative paths, so ensure that we are in the right folder
     cd ${TOPDIR}
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index ea422f9..7c39c68 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -11,7 +11,7 @@ PP = "/home/builder/${PN}"
 BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
 
 do_unpack[dirs] = "${BUILDROOT}"
-do_unpack[stamp-extra-info] = "${DISTRO}"
+do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 S ?= "${BUILDROOT}"
 
 # Unpack package and put it into working directory in buildchroot
@@ -31,7 +31,7 @@ python do_unpack() {
 
 addtask unpack after do_fetch before do_build
 
-do_build[stamp-extra-info] = "${DISTRO}"
+do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 
 # Build package from sources using build script
 do_build() {
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 65d4c11..8588626 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -6,7 +6,7 @@ ROOTFS_EXTRA ?= "64"
 
 EXT4_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${PN}-${MACHINE}-${DISTRO}.ext4.img"
 
-do_ext4_image[stamp-extra-info] = "${MACHINE}"
+do_ext4_image[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 
 # Generate ext4 filesystem image
 do_ext4_image() {
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3e4877c..a7f0d74 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -9,7 +9,7 @@ IMAGE_TYPE    ?= "ext4-img"
 
 inherit ${IMAGE_TYPE}
 
-do_populate[stamp-extra-info] = "${MACHINE}"
+do_populate[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 
 # Install Debian packages, that were built from sources
 do_populate() {
diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index ce35a22..f85f5cc 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -18,10 +18,9 @@
 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 # OTHER DEALINGS IN THE SOFTWARE.
 
-
 DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
 SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
-BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
+BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}-${DISTRO_ARCH}/rootfs"
 
 # Setup our default hash policy
 BB_SIGNATURE_HANDLER ?= "noop"
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index ba1bc66..ccba683 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -23,7 +23,7 @@ BUILDCHROOT_PREINSTALL ?= "gcc \
 
 WORKDIR = "${TMPDIR}/work/${PF}/${DISTRO}"
 
-do_build[stamp-extra-info] = "${DISTRO}"
+do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 
 do_build() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
-- 
2.1.4


  reply	other threads:[~2017-08-08 10:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 10:04 [PATCH 0/4] Various fixes Alexander Smirnov
2017-08-08 10:04 ` Alexander Smirnov [this message]
2017-08-08 10:58   ` [PATCH 1/4] isar: Fix mutli-distro builds in parallel Henning Schild
2017-08-08 11:21     ` Alexander Smirnov
2017-08-08 11:56       ` Henning Schild
2017-08-21 21:11   ` Baurzhan Ismagulov
2017-08-08 10:04 ` [PATCH 2/4] scripts: Update start_vm Alexander Smirnov
2017-08-08 10:04 ` [PATCH 3/4] buildchroot: Fix dependency installation in buildchroot Alexander Smirnov
2017-08-21 21:28   ` Baurzhan Ismagulov
2017-08-08 10:04 ` [PATCH 4/4] buildchroot: Update build script Alexander Smirnov
2017-08-08 11:05   ` Henning Schild
2017-08-21 21:42     ` Baurzhan Ismagulov
2017-08-21 21:35   ` Baurzhan Ismagulov

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=20170808100424.19607-2-asmirnov@ilbers.de \
    --to=asmirnov@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