[PATCH] scripts/get_default_envs.sh: preserve order of multiple entries for same variable

Rasmus Villemoes rasmus.villemoes at prevas.dk
Wed Apr 29 10:46:23 CEST 2020


On 30/01/2020 03.17, Simon Glass wrote:
> On Mon, 6 Jan 2020 at 05:17, Lukasz Majewski <lukma at denx.de> wrote:
>>
>> Hi Rasmus,
>>
>>> It's possible that the default_environment[] array contains multiple
>>> entries for the same variable, e.g. a setting from env_default.h based
>>> on some CONFIG_* variable, and another from
>>> CONFIG_EXTRA_ENV_SETTINGS. In such a case, the last setting takes
>>> effect.
>>>
>>> Hence, in order to be able to use the output from this script as an
>>> CONFIG_DEFAULT_ENV_FILE and get the same default environment as one
>>> currently has, we need to preserve the order. So only sort by the
>>> variable name, and disable the last-resort comparison.
>>>
>>> We could pipe the result through uniq to remove duplicate lines, but I
>>> think there's some value in seeing that certain variables are defined
>>> multiple times.
>>>
>>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
>>> ---
>>>  scripts/get_default_envs.sh | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> Reviewed-by: Lukasz Majewski <lukma at denx.de>
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 

Hi Tom,

This has two R-Bs, perhaps I can get you to pick it up?

Thanks,
Rasmus


More information about the U-Boot mailing list