You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by pa...@apache.org on 2016/08/31 21:29:15 UTC

incubator-mynewt-newt git commit: MYNEWT-264

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 0ca269a01 -> 2c44ae5f4


MYNEWT-264

We check that within the same repo,  there are not two packages with the same name


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

Branch: refs/heads/develop
Commit: 2c44ae5f4cc491afaf3e3bb8d6ff979c315c494e
Parents: 0ca269a
Author: Paul Dietrich <pa...@yahoo.com>
Authored: Wed Aug 31 14:26:37 2016 -0700
Committer: Paul Dietrich <pa...@yahoo.com>
Committed: Wed Aug 31 14:26:37 2016 -0700

----------------------------------------------------------------------
 newt/pkg/localpackage.go | 7 +++++++
 newt/project/project.go  | 4 ----
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/2c44ae5f/newt/pkg/localpackage.go
----------------------------------------------------------------------
diff --git a/newt/pkg/localpackage.go b/newt/pkg/localpackage.go
index 78207b5..b7f5b9c 100644
--- a/newt/pkg/localpackage.go
+++ b/newt/pkg/localpackage.go
@@ -400,6 +400,13 @@ func ReadLocalPackageRecursive(repo *repo.Repo,
 	if err != nil {
 		return err
 	}
+
+	if oldPkg, ok := pkgList[pkg.Name()]; ok {
+		errStr := fmt.Sprintf("Multiple packages with same pkg.name=%s in repo %s\n",
+			oldPkg.FullName(), repo.Name())
+		return util.NewNewtError(errStr)
+	}
+
 	pkgList[pkg.Name()] = pkg
 
 	return nil

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/2c44ae5f/newt/project/project.go
----------------------------------------------------------------------
diff --git a/newt/project/project.go b/newt/project/project.go
index 5368d32..a5575d1 100644
--- a/newt/project/project.go
+++ b/newt/project/project.go
@@ -47,10 +47,6 @@ var PackageSearchDirs []string = []string{
 	"fs/",
 	"libs/",
 	"net/",
-	"hw/bsp/",
-	"hw/mcu/",
-	"hw/mcu/stm",
-	"hw/drivers/",
 	"hw/",
 	"project/",
 	"targets/",