You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/12/07 01:00:47 UTC

incubator-mynewt-newt git commit: newt - Don't always warn about missing repos

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 2828be955 -> 1b5326aa7


newt - Don't always warn about missing repos

Specifically, only warn if the project state file indicates that the
repo should be present.  The problem was that newt was printing this
warning when the user tries to install a repo for the first time.


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

Branch: refs/heads/develop
Commit: 1b5326aa74780d51012b6cd0c0c5fb1f5dc978fd
Parents: 2828be9
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Dec 6 16:59:51 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Dec 6 16:59:51 2016 -0800

----------------------------------------------------------------------
 newt/project/project.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1b5326aa/newt/project/project.go
----------------------------------------------------------------------
diff --git a/newt/project/project.go b/newt/project/project.go
index 5d9d7e3..98857d4 100644
--- a/newt/project/project.go
+++ b/newt/project/project.go
@@ -586,9 +586,12 @@ func (proj *Project) loadPackageList() error {
 		list, warnings, err := pkg.ReadLocalPackages(repo, repo.Path())
 		if err != nil {
 			/* Failed to read the repo's package list.  Report the failure as a
-			 * warning and move on to the next repo.
+			 * warning if the project state indicates that this repo should be
+			 * installed.
 			 */
-			util.StatusMessage(util.VERBOSITY_QUIET, err.Error())
+			if proj.projState.installedRepos[name] != nil {
+				util.StatusMessage(util.VERBOSITY_QUIET, err.Error()+"\n")
+			}
 		} else {
 			proj.packages[name] = list
 		}