From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v4 5/5] events: Do not warn on left mounts by default
Date: Mon, 16 Aug 2021 18:37:56 +0300 [thread overview]
Message-ID: <20210816153756.3549038-6-amikan@ilbers.de> (raw)
In-Reply-To: <20210816153756.3549038-1-amikan@ilbers.de>
Disable warnings printing for all the mount points left after build
completed to do not flood build logs too much in case build fail.
Logging can be enabled by setting ISAR_MOUNTS_CLEANUP_DEBUG to 1.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/conf/local.conf.sample | 3 +++
meta/classes/isar-events.bbclass | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 6cf1656..ca43261 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -219,3 +219,6 @@ USER_isar[flags] = "system create-home"
# Uncomment the below line to debug WIC.
# WIC_CREATE_EXTRA_ARGS += "-D"
+
+# Uncomment this to enable warn on all left mounts after build complete
+#ISAR_MOUNTS_CLEANUP_DEBUG ?= "1"
diff --git a/meta/classes/isar-events.bbclass b/meta/classes/isar-events.bbclass
index 2f8bf6e..60bb1a9 100644
--- a/meta/classes/isar-events.bbclass
+++ b/meta/classes/isar-events.bbclass
@@ -54,7 +54,8 @@ python build_completed() {
with open('/proc/mounts') as f:
for line in f.readlines():
if basepath in line:
- bb.warn('%s left mounted, unmounting...' % line.split()[1])
+ if d.getVar('ISAR_MOUNTS_CLEANUP_DEBUG', True) == '1':
+ bb.warn('%s left mounted, unmounting...' % line.split()[1])
subprocess.call(
["sudo", "umount", "-l", line.split()[1]],
stdout=subprocess.DEVNULL,
--
2.25.1
next prev parent reply other threads:[~2021-08-16 15:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 15:37 [PATCH v4 0/5] Restore downstream mounts compatibility Anton Mikanovich
2021-08-16 15:37 ` [PATCH v4 1/5] Revert "dpkg: Make mount buildroot reliable" Anton Mikanovich
2021-08-16 15:37 ` [PATCH v4 2/5] dpkg: Limit unmount loop Anton Mikanovich
2021-08-16 16:09 ` Henning Schild
2021-08-16 15:37 ` [PATCH v4 3/5] image: Add reference counter Anton Mikanovich
2021-08-16 15:37 ` [PATCH v4 4/5] dpkg-base: Clean up unmounting in do_dpkg_build() Anton Mikanovich
2021-08-16 15:37 ` Anton Mikanovich [this message]
2021-08-16 15:53 ` [PATCH v4 5/5] events: Do not warn on left mounts by default Henning Schild
2021-08-16 16:53 ` Jan Kiszka
2021-08-17 12:36 ` 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=20210816153756.3549038-6-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