* [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions
@ 2021-05-16 14:19 Mircea GLIGA
2021-05-18 20:23 ` Arnout Vandecappelle
2021-05-20 9:38 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Mircea GLIGA @ 2021-05-16 14:19 UTC (permalink / raw)
To: buildroot
Order of the `sed` expressions is important; when this was commited
to master, the order of the expressions from the original patch [1] was
changed, rendering the second expression to noop.
This made all the environment variables from the script to contain
absolute paths: long absolute paths makes verbose builds difficult
to read/follow.
We can take advantage of the fact that the PATH is updated and we
don't have to use absolute paths.
Fixed by reordering the `sed` expresions:
* first update the path of the binaries: e.g. 's%$(HOST_DIR)/bin/%%g'
* only then update remaining paths: e.g. 's%$(HOST_DIR)%\$$SDK_PATH%g'
[1] https://patchwork.ozlabs.org/project/buildroot/patch/20201027140140.47982-1-matthew.weber at rockwellcollins.com/
Signed-off-by: Mircea GLIGA <mgliga@bitdefender.com>
---
package/environment-setup/environment-setup.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk
index fcad013f0d..f4c52921f7 100644
--- a/package/environment-setup/environment-setup.mk
+++ b/package/environment-setup/environment-setup.mk
@@ -26,8 +26,8 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
printf "alias cmake=\"cmake \
-DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
-DCMAKE_INSTALL_PREFIX=/usr\"\n" >> $(ENVIRONMENT_SETUP_FILE)
- $(SED) 's%$(HOST_DIR)%\$$SDK_PATH%g' \
- -e 's%$(HOST_DIR)/bin/%%g' \
+ $(SED) 's%$(HOST_DIR)/bin/%%g' \
+ -e 's%$(HOST_DIR)%\$$SDK_PATH%g' \
-e '/^export "PATH=/c\' \
$(ENVIRONMENT_SETUP_FILE)
printf "export \"PATH=\$$SDK_PATH/bin:\$$SDK_PATH/sbin:\$$PATH\"\n" \
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions
2021-05-16 14:19 [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions Mircea GLIGA
@ 2021-05-18 20:23 ` Arnout Vandecappelle
2021-05-20 9:38 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-05-18 20:23 UTC (permalink / raw)
To: buildroot
On 16/05/2021 16:19, Mircea GLIGA wrote:
> Order of the `sed` expressions is important; when this was commited
> to master, the order of the expressions from the original patch [1] was
> changed, rendering the second expression to noop.
>
> This made all the environment variables from the script to contain
> absolute paths: long absolute paths makes verbose builds difficult
> to read/follow.
> We can take advantage of the fact that the PATH is updated and we
> don't have to use absolute paths.
>
> Fixed by reordering the `sed` expresions:
> * first update the path of the binaries: e.g. 's%$(HOST_DIR)/bin/%%g'
> * only then update remaining paths: e.g. 's%$(HOST_DIR)%\$$SDK_PATH%g'
>
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20201027140140.47982-1-matthew.weber at rockwellcollins.com/
>
> Signed-off-by: Mircea GLIGA <mgliga@bitdefender.com>
Applied to master (since this is fix), thanks.
Thank you for the excellent commit message!
Regards,
Arnout
> ---
> package/environment-setup/environment-setup.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk
> index fcad013f0d..f4c52921f7 100644
> --- a/package/environment-setup/environment-setup.mk
> +++ b/package/environment-setup/environment-setup.mk
> @@ -26,8 +26,8 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
> printf "alias cmake=\"cmake \
> -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
> -DCMAKE_INSTALL_PREFIX=/usr\"\n" >> $(ENVIRONMENT_SETUP_FILE)
> - $(SED) 's%$(HOST_DIR)%\$$SDK_PATH%g' \
> - -e 's%$(HOST_DIR)/bin/%%g' \
> + $(SED) 's%$(HOST_DIR)/bin/%%g' \
> + -e 's%$(HOST_DIR)%\$$SDK_PATH%g' \
> -e '/^export "PATH=/c\' \
> $(ENVIRONMENT_SETUP_FILE)
> printf "export \"PATH=\$$SDK_PATH/bin:\$$SDK_PATH/sbin:\$$PATH\"\n" \
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions
2021-05-16 14:19 [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions Mircea GLIGA
2021-05-18 20:23 ` Arnout Vandecappelle
@ 2021-05-20 9:38 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-05-20 9:38 UTC (permalink / raw)
To: buildroot
>>>>> "Mircea" == Mircea GLIGA <mgliga@bitdefender.com> writes:
> Order of the `sed` expressions is important; when this was commited
> to master, the order of the expressions from the original patch [1] was
> changed, rendering the second expression to noop.
> This made all the environment variables from the script to contain
> absolute paths: long absolute paths makes verbose builds difficult
> to read/follow.
> We can take advantage of the fact that the PATH is updated and we
> don't have to use absolute paths.
> Fixed by reordering the `sed` expresions:
> * first update the path of the binaries: e.g. 's%$(HOST_DIR)/bin/%%g'
> * only then update remaining paths: e.g. 's%$(HOST_DIR)%\$$SDK_PATH%g'
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20201027140140.47982-1-matthew.weber at rockwellcollins.com/
> Signed-off-by: Mircea GLIGA <mgliga@bitdefender.com>
Committed to 2021.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-20 9:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-16 14:19 [Buildroot] [PATCH 1/1] package/environment-setup: Fix incorrect order of the `sed` expressions Mircea GLIGA
2021-05-18 20:23 ` Arnout Vandecappelle
2021-05-20 9:38 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.