mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccoll...@apache.org
Subject incubator-mynewt-newt git commit: Fix bug; identity-based settings not applied.
Date Tue, 10 Nov 2015 21:01:31 GMT
Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/master 3f7e1fb3f -> e459c22f3


Fix bug; identity-based settings not applied.

We were loading several egg settings (e.g., cflags) before loading the exposed
identities.  This caused issues if a setting's value varied based on identity.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/e459c22f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/e459c22f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/e459c22f

Branch: refs/heads/master
Commit: e459c22f36ac18db313c80556f81c7eff0ebb147
Parents: 3f7e1fb
Author: Christopher Collins <ccollins476ad@gmail.com>
Authored: Tue Nov 10 13:00:10 2015 -0800
Committer: Christopher Collins <ccollins476ad@gmail.com>
Committed: Tue Nov 10 13:00:10 2015 -0800

----------------------------------------------------------------------
 cli/egg.go | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e459c22f/cli/egg.go
----------------------------------------------------------------------
diff --git a/cli/egg.go b/cli/egg.go
index 32816a8..5c065d1 100644
--- a/cli/egg.go
+++ b/cli/egg.go
@@ -526,6 +526,14 @@ func (egg *Egg) LoadConfig(t *Target, force bool) error {
 		return err
 	}
 
+	// Append all the identities that this egg exposes to sub-eggs.  This must
+	// be done before the remainder of the settings, as some settings depend on
+	// identity.
+	if t != nil {
+		idents := GetStringSliceIdentities(v, t, "egg.identities")
+		t.Identities = append(t.Identities, idents...)
+	}
+
 	egg.LinkerScript = GetStringIdentities(v, t, "egg.linkerscript")
 	egg.DownloadScript = GetStringIdentities(v, t, "egg.downloadscript")
 	egg.DebugScript = GetStringIdentities(v, t, "egg.debugscript")
@@ -534,12 +542,6 @@ func (egg *Egg) LoadConfig(t *Target, force bool) error {
 	egg.Lflags += GetStringIdentities(v, t, "egg.lflags")
 	egg.Aflags += GetStringIdentities(v, t, "egg.aflags")
 
-	// Append all the identities that this egg exposes to sub-eggs
-	if t != nil {
-		idents := GetStringSliceIdentities(v, t, "egg.identities")
-		t.Identities = append(t.Identities, idents...)
-	}
-
 	// Load egg dependencies
 	depList := GetStringSliceIdentities(v, t, "egg.deps")
 	if len(depList) > 0 {


Mime
View raw message