From: Tom Rini Date: Thu, 7 May 2020 09:03:08 -0400 Subject: [PATCH] scripts/get_default_envs.sh: preserve order of multiple entries for same variable In-Reply-To: <20200106120107.22564-1-rasmus.villemoes@prevas.dk> References: <20200106120107.22564-1-rasmus.villemoes@prevas.dk> Message-ID: <20200507130308.GT12564@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jan 06, 2020 at 12:01:17PM +0000, Rasmus Villemoes wrote: > 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 > Reviewed-by: Lukasz Majewski > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: