mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bastian Stender <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Stender <bst@pengutronix.de>
Subject: [ptxdist] [PATCH] barebox: fix CONFIG_DEFAULT_ENVIRONMENT_PATH on oldconfig/nconfig/menuconfig
Date: Fri, 28 Jul 2017 12:31:57 +0200	[thread overview]
Message-ID: <20170728103157.29115-1-bst@pengutronix.de> (raw)

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 <bst@pengutronix.de>
---
 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
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2017-07-28 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 10:31 Bastian Stender [this message]
2017-09-11  9:10 ` Bastian Stender
2017-09-13 15:12   ` Michael Olbrich
2017-09-13 15:51     ` Bastian Stender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170728103157.29115-1-bst@pengutronix.de \
    --to=bst@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox