public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Florian Bezdeka' via isar-users" <isar-users@googlegroups.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: Re: [PATCH v2 0/3] Start to address umount problems
Date: Wed, 02 Oct 2024 00:33:01 +0200	[thread overview]
Message-ID: <015cefd1513be9e918baefe50b55c8323065c384.camel@siemens.com> (raw)
In-Reply-To: <cover.1727795639.git.jan.kiszka@siemens.com>

On Tue, 2024-10-01 at 17:13 +0200, Jan Kiszka wrote:
> Changes in v2:
>  - break up the previously single patch into refactoring + fix
>  - add a fix for prematurely failing rootfs_do_unounts

For v2:
Tested-by: Florian Bezdeka <florian.bezdeka@siemens.com>

But:
We're not done yet. There are two more calls to rootfs_do_mounts that
are not yet pared with rootfs_do_unmounts calls. The one in
do_rootfs_postprocess is the problematic one from the other thread on
the ML. (Anton is now in CC as well)

I'm currently testing (on top of v2):

diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index c67d3bb8..e359d529 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -235,18 +235,21 @@ python do_rootfs_install() {
 
     progress_reporter = bb.progress.MultiStageProgressReporter(d, stage_weights)
 
-    for cmd in cmds:
-        progress_reporter.next_stage()
+    try:
+        for cmd in cmds:
+            progress_reporter.next_stage()
 
-        if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "acquire-before":
-            lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",
-                                     shared=True)
+            if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "acquire-before":
+                lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",
+                                         shared=True)
 
-        bb.build.exec_func(cmd, d)
+            bb.build.exec_func(cmd, d)
 
-        if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "release-after":
-            bb.utils.unlockfile(lock)
-    progress_reporter.finish()
+            if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "release-after":
+                bb.utils.unlockfile(lock)
+            progress_reporter.finish()
+    finally:
+        bb.build.exec_func('rootfs_do_umounts', d)
 }
 addtask rootfs_install before do_rootfs_postprocess after do_unpack
 
@@ -366,9 +369,13 @@ python do_rootfs_postprocess() {
     if cmds is None or not cmds.strip():
         return
     cmds = cmds.split()
-    for i, cmd in enumerate(cmds):
-        bb.build.exec_func(cmd, d)
-        progress_reporter.update(int(i / len(cmds) * 100))
+
+    try:
+        for i, cmd in enumerate(cmds):
+            bb.build.exec_func(cmd, d)
+            progress_reporter.update(int(i / len(cmds) * 100))
+    finally:
+        bb.build.exec_func('rootfs_do_umounts', d)
 }
 addtask rootfs_postprocess before do_rootfs after do_unpack


> 
> Jan Kiszka (3):
>   image: Avoid breaking the build when mounts are no longer present on
>     umount
>   rootfs: Provide rootfs_do_umounts
>   initramfs: Add missing umounts after generation
> 
>  meta/classes/image.bbclass     | 21 ++-------------------
>  meta/classes/initramfs.bbclass |  2 ++
>  meta/classes/rootfs.bbclass    | 32 ++++++++++++++++++++++++++++++++
>  3 files changed, 36 insertions(+), 19 deletions(-)
> 
> -- 
> 2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/015cefd1513be9e918baefe50b55c8323065c384.camel%40siemens.com.

      parent reply	other threads:[~2024-10-01 22:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 15:13 'Jan Kiszka' via isar-users
2024-10-01 15:13 ` [PATCH v2 1/3] image: Avoid breaking the build when mounts are no longer present on umount 'Jan Kiszka' via isar-users
2024-10-01 15:13 ` [PATCH v2 2/3] rootfs: Provide rootfs_do_umounts 'Jan Kiszka' via isar-users
2024-10-01 15:13 ` [PATCH v2 3/3] initramfs: Add missing umounts after generation 'Jan Kiszka' via isar-users
2024-10-01 22:33 ` 'Florian Bezdeka' via isar-users [this message]

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=015cefd1513be9e918baefe50b55c8323065c384.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=amikan@ilbers.de \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.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