From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Jan Kiszka <jan.kiszka@web.de>, isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] isar-events: Fix processing of /proc/mounts
Date: Tue, 11 Dec 2018 11:12:45 +0300 [thread overview]
Message-ID: <7a323504-2124-ba21-86f7-987414505f5d@ilbers.de> (raw)
In-Reply-To: <dda77f5a-c50a-2dd0-41f4-864f0bbee1d1@web.de>
On 12/9/18 7:06 PM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> We have to read /proc/mounts completely before starting to umount. That
> virtual file will change after each umount, and that could make us miss
> some mount points.
Applied to the 'next',
Thanks,
Maxim.
> Fixes: 05d0fc43e9e9 ("isar-events: Improve umount handler")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/isar-events.bbclass | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/isar-events.bbclass b/meta/classes/isar-events.bbclass
> index 05b27e5..c4a6149 100644
> --- a/meta/classes/isar-events.bbclass
> +++ b/meta/classes/isar-events.bbclass
> @@ -18,10 +18,11 @@ python isar_handler() {
>
> with open(os.devnull, 'w') as devnull:
> with open('/proc/mounts', 'rU') as f:
> - for line in f:
> - if basepath in line:
> - subprocess.call('sudo umount -l ' + line.split()[1],
> - stdout=devnull, stderr=devnull, shell=True)
> + lines = f.readlines()
> + for line in lines:
> + if basepath in line:
> + subprocess.call('sudo umount -l ' + line.split()[1],
> + stdout=devnull, stderr=devnull, shell=True)
> }
>
> isar_handler[eventmask] = "bb.runqueue.runQueueExitWait bb.event.BuildCompleted"
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
prev parent reply other threads:[~2018-12-11 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-09 16:06 Jan Kiszka
2018-12-11 8:12 ` Maxim Yu. Osipov [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=7a323504-2124-ba21-86f7-987414505f5d@ilbers.de \
--to=mosipov@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@web.de \
/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