public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 2/2] image: Protect shared deploy directory usage
Date: Tue, 28 Dec 2021 09:29:32 +0300	[thread overview]
Message-ID: <20211228062932.167496-3-amikan@ilbers.de> (raw)
In-Reply-To: <20211228062932.167496-1-amikan@ilbers.de>

Image deployment directory is shared between the targets with the same
machine name, but there was no any protection when copy bootables with
the same file names. So building multiconfig qemuamd64 targets can fail
with:

ERROR: mc:qemuamd64-buster-tgz:isar-image-base-1.0-r0 do_copy_boot_files:
Execution of 'tmp/work/debian-buster-amd64/isar-image-base-qemuamd64-targz-img/1.0-r0/temp/run.do_copy_boot_files.31554' failed with exit code 1:
cp: cannot create regular file 'tmp/deploy/images/qemuamd64/isar-image-base-debian-buster-qemuamd64-initrd.img': File exists

This is caused by initrd file creation by the multiple
do_copy_boot_files instances.
To fix the issue additional lock introduced.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/image.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index bd58056..a10f0d7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -139,6 +139,7 @@ EOF
 }
 
 do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
+do_copy_boot_files[lockfiles] += "${DEPLOY_DIR_IMAGE}/isar.lock"
 do_copy_boot_files() {
     kernel="$(realpath -q '${IMAGE_ROOTFS}'/vmlinu[xz])"
     if [ ! -f "$kernel" ]; then
-- 
2.25.1


  parent reply	other threads:[~2021-12-28  6:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28  6:29 [PATCH 0/2] Protect parallel image building Anton Mikanovich
2021-12-28  6:29 ` [PATCH 1/2] image: Make mount points imagetype-specific Anton Mikanovich
2021-12-28  6:29 ` Anton Mikanovich [this message]
2022-01-10  7:50 ` [PATCH 0/2] Protect parallel image building Anton Mikanovich

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=20211228062932.167496-3-amikan@ilbers.de \
    --to=amikan@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