docs/manual: use space-separated list for BR2_EXTERNAL

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 passed 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 20cd497387 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>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
Yann E. MORIN
2026-02-03 22:54:30 +01:00
committed by Romain Naour
parent 72e068001b
commit f9cdca48a5
2 changed files with 6 additions and 2 deletions

View File

@@ -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:

View File

@@ -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}"