ccollins476ad commented on a change in pull request #363: newt upgrade: Fix 
repo conflict error message
URL: https://github.com/apache/mynewt-newt/pull/363#discussion_r367088854
 
 

 ##########
 File path: newt/deprepo/deprepo.go
 ##########
 @@ -236,15 +236,20 @@ func PruneMatrix(m *Matrix, repos RepoMap, rootReqs 
RequirementMap) error {
 // of repos in the project.
 func PruneDepGraph(dg DepGraph, keep []*repo.Repo) {
        for k, _ := range dg {
-               found := false
-               for _, r := range keep {
-                       if r.Name() == k.Name {
-                               found = true
-                               break
+               // The empty string indicates a `project.yml` requirement.  
Always
+               // keep these.
+               if k.Name != "" {
+                       found := false
+
+                       for _, r := range keep {
+                               if k.Name == "" || k.Name == r.Name() {
 
 Review comment:
   You're right, good catch.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to