You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/28 02:09:36 UTC

[09/32] incubator-mynewt-newt git commit: Valid BSP values were displayed incorrectly.

Valid BSP values were displayed incorrectly.

Old (broken) behavior:

[ccollins@ccollins-mac:~/tmp/myproj]$ newt target set my_blinky_sim bsp
Valid values for target variable "target.bsp":
    @repos/apache-mynewt-core/hw/bsp/bmd300eval
    @repos/apache-mynewt-core/hw/bsp/native

New (fixed) behavior:

[ccollins@ccollins-mac:~/tmp/myproj]$ newt target set my_blinky_sim bsp
Valid values for target variable "target.bsp":
    @apache-mynewt-core/hw/bsp/native
    @apache-mynewt-core/hw/bsp/nrf51dk

(leading "repos/" shouldn't be there).


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/f851db07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/f851db07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/f851db07

Branch: refs/heads/master
Commit: f851db07aae34e6af654c710e90ad4d08c2fe67a
Parents: a6ae7a8
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 29 20:23:56 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 29 20:23:56 2016 -0700

----------------------------------------------------------------------
 newt/target/vars.go | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/f851db07/newt/target/vars.go
----------------------------------------------------------------------
diff --git a/newt/target/vars.go b/newt/target/vars.go
index 1e7257b..ab2d671 100644
--- a/newt/target/vars.go
+++ b/newt/target/vars.go
@@ -84,12 +84,8 @@ func varsFromPackageType(pt PackageType, fullPath bool) ([]string, error) {
 }
 
 var varsMap = map[string]func() ([]string, error){
-	"target.arch": func() ([]string, error) {
-		return varsFromChildDirs("arch", false)
-	},
-
 	"target.bsp": func() ([]string, error) {
-		return varsFromChildDirs("bsp", true)
+		return varsFromPackageType(pkg.PACKAGE_TYPE_BSP, true)
 	},
 
 	"target.app": func() ([]string, error) {