You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2019/04/17 20:42:50 UTC
[mynewt-newt] branch master updated: Allow target key_file to
resolve pkgpath
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
The following commit(s) were added to refs/heads/master by this push:
new 9540db0 Allow target key_file to resolve pkgpath
9540db0 is described below
commit 9540db0b4166a2abeacb6032129ad676eb7b262b
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Wed Apr 17 15:45:15 2019 -0300
Allow target key_file to resolve pkgpath
---
newt/target/target.go | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/newt/target/target.go b/newt/target/target.go
index 670df13..9680ecb 100644
--- a/newt/target/target.go
+++ b/newt/target/target.go
@@ -26,6 +26,7 @@ import (
"strconv"
"mynewt.apache.org/newt/newt/config"
+ "mynewt.apache.org/newt/newt/interfaces"
"mynewt.apache.org/newt/newt/pkg"
"mynewt.apache.org/newt/newt/project"
"mynewt.apache.org/newt/newt/repo"
@@ -106,6 +107,14 @@ func (target *Target) Load(basePkg *pkg.LocalPackage) error {
}
target.KeyFile = yc.GetValString("target.key_file", nil)
+ if target.KeyFile != "" {
+ proj := interfaces.GetProject()
+ path, err := proj.ResolvePath(proj.Path(), target.KeyFile)
+ if err == nil {
+ target.KeyFile = path
+ }
+ }
+
target.PkgProfiles = yc.GetValStringMapString(
"target.package_profiles", nil)