On 07/28/2017 12:31 PM, Bastian Stender wrote:
ptxdist adds ".ptxdist-defaultenv" if PTXCONF_BAREBOX_EXTRA_ENV is
enabled. If barebox oldconfig/nconfig/menuconfig do not modify the
configuration the barebox config from the BSP is copied without
executing the prepare stage responsible for amending
".ptxdist-defaultenv".
Steps to reproduce:
ptxdist targetinstall barebox
ptxdist menuconfig barebox (without modification)
ptxdist drop barebox.compile
ptxdist targetinstall barebox
Now CONFIG_DEFAULT_ENVIRONMENT_PATH is missing ".ptxdist-defaultenv"
leading to an unexpected environment.
Fix this by amending ".ptxdist-defaultenv" after
oldconfig/nconfig/menuconfig.
Signed-off-by: Bastian Stender <[email protected]>
---
rules/barebox.make | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/rules/barebox.make b/rules/barebox.make
index bdfefe8c6..d391ec9eb 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -208,4 +208,11 @@ barebox_oldconfig barebox_menuconfig barebox_nconfig:
$(STATEDIR)/barebox.extrac
cp $(BAREBOX_DIR)/.config $(BAREBOX_CONFIG); \
fi
+ifdef PTXCONF_BAREBOX_EXTRA_ENV
+ @if test -e $(BAREBOX_CONFIG); then \
+ @sed -i -e "s,^\(CONFIG_DEFAULT_ENVIRONMENT_PATH=.*\)\"$$,\1
.ptxdist-defaultenv\"," \
+ $(BAREBOX_DIR)/.config
+ fi
+endif
+
# vim: syntax=make
Any thoughts on this patch?
Bastian
_______________________________________________
ptxdist mailing list
[email protected]