From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Perale <thomas.perale@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 3/3 v4] docs/manual: use space-separated list for BR2_EXTERNAL
Date: Fri, 20 Mar 2026 16:55:01 +0100 [thread overview]
Message-ID: <20260320155501.176423-1-thomas.perale@mind.be> (raw)
In-Reply-To: <3bf503a96d4ef1a70f0f95b6c6872129143d5fa1.1770155657.git.yann.morin.1998@free.fr>
In reply of:
> Specifying a list of br2-external trees is poorly documented, and the
> only example uses a colon to separate the br2-external paths.
>
> Adding the support for colon-separated list is the biggest mistake that
> was made when introducing support for multiple br2-external [0]. Indeed,
> both space and colon can be used to separate entries in the list, and it
> is also possible to mix the two. However, internally, the list is stored
> as a space-separated list, and all the code will split on spaces.
>
> Besides, all other lists in Buildroot are a space-separated:
> BR2_ROOTFS_DEVICE_TABLE
> BR2_ROOTFS_STATIC_DEVICE_TABLE
> BR2_TARGET_TZ_ZONELIST
> BR2_ROOTFS_USERS_TABLES
> BR2_ROOTFS_OVERLAY
> BR2_ROOTFS_PRE_BUILD_SCRIPT
> BR2_ROOTFS_POST_BUILD_SCRIPT
> BR2_ROOTFS_POST_FAKEROOT_SCRIPT
> BR2_ROOTFS_POST_IMAGE_SCRIPT
> ...
>
> So, using colons is odd.
>
> The fact that BR2_EXTERNAL is pqssed on the command line rather than
> being a Kconfig item is not a reason enough to justify that it be
> colon-separated.
>
> Change the documentation to only mention using a space-separated list.
>
> Of course, for backward compatibility, we keep the code as-is to accept
> a colon-separated list, but we just do not advertise it.
>
> Note that keeping the split on colons means that colons are not accepted
> in pathnames of br2-external trees; in practice, this is not a new
> restriction, or one that could lift as usign colons in Makefiles are
> problematic anyway.
>
> [0] in 20cd49738781 core: add support for multiple br2-external trees
>
> Reported-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> Reported-by: Brandon Maier <Brandon.Maier@collins.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>
Applied to 2025.02.x & 2026.02.x. Thanks
> ---
> Note: support/scripts/br2-external has shellcheck issues; this commit
> does not try to address those on purpose, as it only adds a comment.
>
> ---
> Changes v3 -> v4:
> - add an extract of all other list variables from [1]
> - sumarise and include Arnout's comments from [2]
> - fix typo
>
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20240904205354.504964-1-yann.morin.1998@free.fr/#3375145
> [2] https://patchwork.ozlabs.org/project/buildroot/patch/20240904205354.504964-1-yann.morin.1998@free.fr/#3375416
>
> Changes v2 -> v3:
> - add comment in support/scripts/br2-external (Fiona)
>
> Changes v1 -> v2:
> - fix typoes
> ---
> docs/manual/customize-outside-br.adoc | 5 +++--
> support/scripts/br2-external | 3 +++
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/docs/manual/customize-outside-br.adoc b/docs/manual/customize-outside-br.adoc
> index 78065489d4..8a76f3a998 100644
> --- a/docs/manual/customize-outside-br.adoc
> +++ b/docs/manual/customize-outside-br.adoc
> @@ -58,10 +58,11 @@ We can switch to another br2-external tree at any time:
> buildroot/ $ make BR2_EXTERNAL=/where/we/have/bar xconfig
> ----
>
> -We can also use multiple br2-external trees:
> +We can also use multiple br2-external trees, by specifying a space-separated
> +list of paths to use:
>
> ----
> -buildroot/ $ make BR2_EXTERNAL=/path/to/foo:/where/we/have/bar menuconfig
> +buildroot/ $ make BR2_EXTERNAL="/path/to/foo /where/we/have/bar" menuconfig
> ----
>
> Or disable the usage of any br2-external tree:
> diff --git a/support/scripts/br2-external b/support/scripts/br2-external
> index 474feaded7..641f8e18ae 100755
> --- a/support/scripts/br2-external
> +++ b/support/scripts/br2-external
> @@ -34,6 +34,9 @@ main() {
> error "Cannot create output directory '%s'\n" "${outputdir}"
> fi
>
> + # Historically, BR2_EXTERNAL could also be colon-separated, so for
> + # backward compatibility, keep splitting on colons (in addition to
> + # spaces).
> # shellcheck disable=SC2068 # We do want to split on spaces
> do_validate "${outputdir}" ${@//:/ }
> do_mk "${outputdir}"
> --
> 2.52.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-03-20 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 21:54 [Buildroot] [PATCH 0/3 v4] support/br2-external: fix shellcheck and better document BR2_EXTERNAL (branch yem/misc) Yann E. MORIN via buildroot
2026-02-03 21:54 ` [Buildroot] [PATCH 1/3 v4] support/br2-external: remove leftover trap Yann E. MORIN via buildroot
2026-03-13 21:25 ` Romain Naour via buildroot
2026-03-20 15:55 ` Thomas Perale via buildroot
2026-02-03 21:54 ` [Buildroot] [PATCH 2/3 v4] support/br2-external: fix remaining shellcheck errors Yann E. MORIN via buildroot
2026-03-20 15:55 ` Thomas Perale via buildroot
2026-02-03 21:54 ` [Buildroot] [PATCH 3/3 v4] docs/manual: use space-separated list for BR2_EXTERNAL Yann E. MORIN via buildroot
2026-03-20 15:55 ` Thomas Perale via buildroot [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=20260320155501.176423-1-thomas.perale@mind.be \
--to=buildroot@buildroot.org \
--cc=thomas.perale@mind.be \
--cc=yann.morin.1998@free.fr \
/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