[Buildroot] [PATCH] merge_config.sh: Fix merging buildroot config files

Arnout Vandecappelle arnout at mind.be
Fri Nov 2 10:05:48 UTC 2018

On 02/11/18 08:55, yamada.masahiro at socionext.com wrote:
> Hi.
>> -----Original Message-----
>> From: Nasser [mailto:afshin.nasser at gmail.com]
>> Sent: Friday, November 02, 2018 11:13 AM
>> To: Petr Vorel <petr.vorel at gmail.com>
>> Cc: Arnout Vandecappelle <arnout at mind.be>; buildroot at buildroot.org;
>> Matthew Weber <matthew.weber at rockwellcollins.com>; Angelo Compagnucci
>> <angelo.compagnucci at gmail.com>; Yamada, Masahiro/山田 真弘
>> <yamada.masahiro at socionext.com>
>> Subject: Re: [PATCH] merge_config.sh: Fix merging buildroot config files
>> Hi Petr, Arnout,
>> On Thu, Nov 01, 2018 at 05:19:19PM +0100, Petr Vorel wrote:
>>> Hi Arnout,
>>>>> Removing unset will cause the following make command work wrong. Note
>>>>> that the value of this environment variable is checked [1] and used.
>> The
>>>>> result of removing the unset line is that we will have double BR2_
>>>>> prefixes in the final .config file as well as lots of warnings when
>>>>> checking if all specified config values have been taken.
>>>>  We have no prefix, the BR2_ is mere convention. So when calling
>> merge_config,
>>>> we should set CONFIG_ to empty, not to BR2_.
>>>>  So indeed, the unset should be removed.
>>> +1. I overlooked that regexp works with empty $CONFIG_ as well.
>>> Thanks for explanation.
>> As we discussed earlier [1], setting CONFIG_ to empty, makes most comments
>> to
>> be identified as config fragments and generate false warnings.
> I was also being worried about this.
> We could improve the sed pattern.
> How about this?
> https://patchwork.kernel.org/patch/10665119/

 Perhaps it's better to make the entire pattern explicit, like:

\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\) is not set$/\1\2/p"

(\1\2 works because only one of the two subexpressions matches, so either \1 or
\2 must be empty).


More information about the buildroot mailing list