Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Arnout Vandecappelle <arnout@rnout.be>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 07/13] support/scripts; teach check-merged what to check
Date: Sat, 17 May 2025 17:07:25 +0200	[thread overview]
Message-ID: <aCimLWtydyZb0lxf@landeda> (raw)
In-Reply-To: <447ef018-8c6c-4800-9013-0239886c9da1@rnout.be>

Arnout, All,

On 2025-05-17 12:24 +0200, Arnout Vandecappelle spake thusly:
> On 14/05/2025 18:58, Yann E. MORIN wrote:
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
[--SNIP--]
> > diff --git a/package/skeleton-custom/skeleton-custom.mk b/package/skeleton-custom/skeleton-custom.mk
> > index 7d64959711..e583d2d731 100644
> > --- a/package/skeleton-custom/skeleton-custom.mk
> > +++ b/package/skeleton-custom/skeleton-custom.mk
> > @@ -25,10 +25,11 @@ endif
> >   # For a merged /usr, ensure that /lib, /bin and /sbin and their /usr
> >   # counterparts are appropriately setup as symlinks ones to the others.
> > -ifeq ($(BR2_ROOTFS_MERGED_USR),y)
> >   SKELETON_CUSTOM_NOT_MERGED_USR_DIRS = \
> > -	$(shell support/scripts/check-merged $(SKELETON_CUSTOM_PATH))
> > -endif # merged /usr
> > +	$(shell support/scripts/check-merged \
> > +		$(SKELETON_CUSTOM_PATH) \
> > +		$(if $(BR2_ROOTFS_MERGED_USR),merged-usr) \
> > +	)
> 
>  While you're anyway working on this: I think there's little point of doing
> this as a "preliminary" check, I think it's fine to do this check while
> "building" the custom skeleton (i.e. in
> SKELETON_CUSTOM_INSTALL_TARGET_CMDS).
> 
>  That would allow us to move the error message to the check-merged script
> itself, and let it return 1 in case it's not properly merged. And with that,
> both instances can simply call the script without capturing its output. It's
> going to save +-10 lines of code and make things easier to understand IMHO.

I was considering something in that spirit, so your suggesting it just
confirms that it is a good idea, and I'll look into doing that.

> >   ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM)$(BR_BUILDING),yy)
> >   ifneq ($(SKELETON_CUSTOM_NOT_MERGED_USR_DIRS),)
> > diff --git a/support/scripts/check-merged b/support/scripts/check-merged
> > index 9459d975fe..7fea4e1dea 100755
> > --- a/support/scripts/check-merged
> > +++ b/support/scripts/check-merged
> > @@ -11,12 +11,14 @@
> >   #
> >   # Input:
> >   #   $1:     the root directory (skeleton, overlay) to check
> > +#   $*:     the list of merged checks to perform: merged-usr
> 
>  If you make this an option (i.e. --merged-usr), then we can replace $1 with
> a $* that covers all directories, and we can get rid of the foreach in
> Makefile's check of the overlays, and that code could simplify to:
> 
> 	@$(call MESSAGE,"Sanity check in overlays)
> 	support/scripts/check-merged \
> 		$(if $(BR2_ROOTFS_MERGED_USR),--merged-usr) \
> 		$(call qstrip,$(BR2_ROOTFS_OVERLAY))
> 
>  Of course, there's a risk that I'm overengineering things, so feel free to
> ignore my suggestions.

I also like it a bit better, indeed. Let's see what I can come up
with...

Thanks.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-05-17 15:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 16:58 [Buildroot] [PATCH 00/13] system: add support for merged-bin (branch yem/merged-bin) Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 01/13] system: reword merged-usr prompt Yann E. MORIN
2025-05-17 10:07   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 02/13] system: drop superfluous negative condition for default PATH Yann E. MORIN
2025-05-17 10:07   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 03/13] package/systemd: select merged-usr from package, not init Yann E. MORIN
2025-05-17 10:07   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 04/13] support/scripts: comonalise checking merged status Yann E. MORIN
2025-05-17 10:08   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 05/13] support/scripts: fix and restrict conditions to accept merged dirs Yann E. MORIN
2025-05-17  7:59   ` Yann E. MORIN
2025-05-17  9:12     ` Arnout Vandecappelle via buildroot
2025-05-17 10:13     ` Arnout Vandecappelle via buildroot
2025-05-17 15:02       ` Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 06/13] support/scripts: rename check-merged-usr.sh Yann E. MORIN
2025-05-17 10:35   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 07/13] support/scripts; teach check-merged what to check Yann E. MORIN
2025-05-17 10:24   ` Arnout Vandecappelle via buildroot
2025-05-17 15:07     ` Yann E. MORIN [this message]
2025-05-14 16:58 ` [Buildroot] [PATCH 08/13] system: add support for merged /usr/sbin (aka merged-bin) Yann E. MORIN
2025-05-17 10:38   ` Arnout Vandecappelle via buildroot
2025-05-17 16:52   ` Edgar Bonet via buildroot
2025-05-17 20:10     ` Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 09/13] package/systemd: require merged-bin Yann E. MORIN
2025-05-17 10:38   ` Arnout Vandecappelle via buildroot
2025-05-14 16:58 ` [Buildroot] [PATCH 10/13] package/coreutils: no need for chroot workaround with merged-bin Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 11/13] package/kmod: adjust paths for merged-bin Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 12/13] package/util-linux: " Yann E. MORIN
2025-05-14 16:58 ` [Buildroot] [PATCH 13/13] toolchain/external: support merged-bin Yann E. MORIN

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=aCimLWtydyZb0lxf@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=arnout@rnout.be \
    --cc=buildroot@buildroot.org \
    /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