mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Teresa Gámez" <t.gamez@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] defaultenv: Reorder overlay append order
Date: Thu, 11 Sep 2014 09:24:25 +0200	[thread overview]
Message-ID: <20140911072425.GI4992@pengutronix.de> (raw)
In-Reply-To: <1410360368-18808-1-git-send-email-t.gamez@phytec.de>

Hi Teresa,

On Wed, Sep 10, 2014 at 04:46:08PM +0200, Teresa Gámez wrote:
> The defaultenv_add_base() functions adds the enviroment coming from
> CONFIG_DEFAULT_ENVIRONMENT_PATH. But this is not only for
> traditional enviroments, but also for external enviroments in e.g. build
> systems. The external enviroment should override the enviroment set
> in the board file and not the other way around. Made sure that
> external enviroment is always added last.
> 
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>

So what happens is:

At some point board code calls defaultenv_append() which calls
defaultenv_add_base() which in turn registers all default env snippets
including the one from CONFIG_DEFAULT_ENVIRONMENT_PATH. After this
defaultenv_append adds the snippet passed to it.
Instead you want CONFIG_DEFAULT_ENVIRONMENT_PATH to be the last instance
and register it right before using the default environment in
defaultenv_load().

I had some trouble understanding what was wrong and how you solved
it, the above is mainly for me. I hope I find it the next time I stumble
upon this ;)
Something tells me this is not the last time I think about this piece
of code.

Ok, applied.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2014-09-11  7:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 14:46 Teresa Gámez
2014-09-11  7:24 ` Sascha Hauer [this message]

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=20140911072425.GI4992@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=t.gamez@phytec.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