public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH 1/3] mount: Add unmount requirement to API changelog
Date: Wed, 30 Jun 2021 14:11:15 +0200	[thread overview]
Message-ID: <dcc505dc-e706-b409-ee42-2c1d886a8a4b@siemens.com> (raw)
In-Reply-To: <20210630113547.87295-2-amikan@ilbers.de>

On 30.06.21 13:35, Anton Mikanovich wrote:
> After the latest mount rebuild any usage of mount functions should be
> ended with the following unmount call.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  RECIPE-API-CHANGELOG.md | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 806c291..546d91c 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -292,3 +292,24 @@ Migrate your patches so they can be applied with "git am", or
>  
>  Kernel image name for arm64 platforms is vmlinux now. Image format was
>  not changed (uncompressed executable) but now it is named correctly.
> +
> +### Make unmounting mandatory
> +
> +There were mount API to provide some path inside chroots:
> +```
> +dpkg_do_mounts
> +buildchroot_do_mounts
> +image_do_mounts
> +rootfs_do_mounts
> +```
> +
> +From now those calls should be always followed by unmount actions:
> +
> +```
> +dpkg_undo_mounts
> +buildchroot_undo_mounts
> +image_undo_mounts
> +rootfs_undo_mounts
> +```
> +
> +It case any unmounted paths left at the end of build warnings will be thrown.
> 

That's only one part of the story:

dpkg_do_mounts, e.g., used to be a shell function. Now it's a python
function. So,

do_my_task() {
    dpkg_do_mounts
    sudo chroot ...
    dpkg_undo_mounts
}

like in [1] no longer works and requires to factor the shell part and
rewrite the main task in python.

BTW, [1] already followed that pattern, so it's not really a new thing.

Jan

[1] https://github.com/siemens/meta-iot2050/blob/master/classes/npm.bbclass

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

  reply	other threads:[~2021-06-30 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 11:35 [PATCH 0/3] Update Isar documentation Anton Mikanovich
2021-06-30 11:35 ` [PATCH 1/3] mount: Add unmount requirement to API changelog Anton Mikanovich
2021-06-30 12:11   ` Jan Kiszka [this message]
2021-06-30 11:35 ` [PATCH 2/3] doc: Update tasks description Anton Mikanovich
2021-06-30 11:35 ` [PATCH 3/3] doc: Update available image types 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=dcc505dc-e706-b409-ee42-2c1d886a8a4b@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=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