[Buildroot] environment variables with spaces (request for comments)

Arnout Vandecappelle arnout at mind.be
Wed Mar 3 16:35:38 UTC 2021



On 02/03/2021 16:43, Dan Raymond wrote:
> I encountered a bug in Buildroot that resulted in a failure to run 'make
> linux-menuconfig'.  I tracked down the problem to a bug in
> package/pkg-kconfig.mk that was attempting to remove a set of variables from an
> environment string.  The problem is that a naive technique was being used that
> did not account for quoted variables that contained embedded spaces.  To be
> clear, 'make menuconfig' from the linux kernel tree works fine: this bug is in
> Buildroot only.  The reason I discovered this bug (and others may not) is
> because my PATH environment variable contains embedded spaces (which may be
> uncommon but valid and sometimes necessary).
> 
> I implemented/tested/submitted a patch that reliably fixes the bug.
> 
> Yann MORIN objected to my patch because he believes some of the packages
> Buildroot supports contain similar bugs.  I responded to his objection but he
> ignored my response and submitted his own patch that undermines mine by
> intentionally causing ALL make targets to fail when the PATH environment
> variable contains embedded spaces.  I don't think that starting a "patch war" is
> productive or contributes to the goals of the Buildroot community.  Can we have
> a discussion instead and come to a consensus on this matter?

 Yann's point is absolutely valid: any configuration except the most trivial one
will fail to build when PATH contains spaces, and it will do so in a
spectacularly difficult to debug way. So Yann's patch is definitely needed.

 However, that shouldn't stop us from fixing things where we can anyway.

 Thus, I'm inclined to merge both patches. However, I have some reservations
about the fix as well - I'll ventilate those in the patch thread.

 Regards,
 Arnout




More information about the buildroot mailing list