public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: roberto.foglietta@linuxteam.org
To: isar-users@googlegroups.com
Cc: roberto.foglietta@gmail.com
Subject: [PATCH v2] rootfs: lock undefined in corner cases, bugfix
Date: Fri,  6 Jan 2023 19:02:42 +0100	[thread overview]
Message-ID: <20230106180242.3276764-1-roberto.foglietta@linuxteam.org> (raw)

From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>

rootfs: lock undefined in corner cases, bugfix

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/rootfs.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 786682d..b4785f2 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -200,11 +200,14 @@ python do_rootfs_install() {
         if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "acquire-before":
             lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",
                                      shared=True)
+        else:
+            lock = ""
 
         bb.build.exec_func(cmd, d)
 
         if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "release-after":
-            bb.utils.unlockfile(lock)
+            if (lock != ""):
+                bb.utils.unlockfile(lock)
     progress_reporter.finish()
 }
 addtask rootfs_install before do_rootfs_postprocess after do_unpack
-- 
2.34.1

                 reply	other threads:[~2023-01-06 18:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230106180242.3276764-1-roberto.foglietta@linuxteam.org \
    --to=roberto.foglietta@linuxteam.org \
    --cc=isar-users@googlegroups.com \
    --cc=roberto.foglietta@gmail.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