openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Markus Volk <f_l_k@t-online.de>,
	openembedded-core@lists.openembedded.org
Cc: ross.burton@arm.com
Subject: Re: [oe-core][PATCH] wic-imager-direct.py: use fstab update also for root device
Date: Thu, 29 Sep 2022 16:32:40 +0100	[thread overview]
Message-ID: <f0eca98f9324c537e2aee3c655258f98372d7926.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220929125750.3338743-1-f_l_k@t-online.de>

On Thu, 2022-09-29 at 14:57 +0200, Markus Volk wrote:
> Remove the hardcoded root device entry from fstab when updating to
> avoid duplicate entries.
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  scripts/lib/wic/plugins/imager/direct.py | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
> index da483daed5..fd86a094d9 100644
> --- a/scripts/lib/wic/plugins/imager/direct.py
> +++ b/scripts/lib/wic/plugins/imager/direct.py
> @@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin):
>          updated = False
>          for part in self.parts:
>              if not part.realnum or not part.mountpoint \
> -               or part.mountpoint == "/" or not part.mountpoint.startswith('/'):
> +               or not part.mountpoint.startswith('/'):
>                  continue
>  
>              if part.use_uuid:
> @@ -145,6 +145,11 @@ class DirectPlugin(ImagerPlugin):
>              fstab_lines.append(line)
>              updated = True
>  
> +        for line in fstab_lines:
> +            if '/dev/root' in line:
> +                fstab_lines.remove(line)
> +                updated = True
> +

Do we need to worry here about whether we're actually adding a new root
entry? Is there a case it does need to be preserved?

Cheers,

Richard





  parent reply	other threads:[~2022-09-29 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 12:57 [oe-core][PATCH] wic-imager-direct.py: use fstab update also for root device Markus Volk
2022-09-29 13:08 ` Alexander Kanavin
2022-09-29 15:10   ` Markus Volk
2022-09-29 15:32 ` Richard Purdie [this message]
2022-09-29 15:56   ` Markus Volk
     [not found]   ` <17195FE5AE38CC13.31922@lists.openembedded.org>
2022-09-29 16:27     ` Markus Volk

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=f0eca98f9324c537e2aee3c655258f98372d7926.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=f_l_k@t-online.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@arm.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;
as well as URLs for NNTP newsgroup(s).