Fixed #324: Glide tries to update ignored package
diff --git a/repo/installer.go b/repo/installer.go index bebc3df..f14b595 100644 --- a/repo/installer.go +++ b/repo/installer.go
@@ -118,8 +118,8 @@ return newConf, nil } - ConcurrentUpdate(newConf.Imports, cwd, i) - ConcurrentUpdate(newConf.DevImports, cwd, i) + ConcurrentUpdate(newConf.Imports, cwd, i, newConf) + ConcurrentUpdate(newConf.DevImports, cwd, i, newConf) return newConf, nil } @@ -131,12 +131,12 @@ dest := i.VendorPath() - if err := ConcurrentUpdate(conf.Imports, dest, i); err != nil { + if err := ConcurrentUpdate(conf.Imports, dest, i, conf); err != nil { return err } if useDev { - return ConcurrentUpdate(conf.DevImports, dest, i) + return ConcurrentUpdate(conf.DevImports, dest, i, conf) } return nil @@ -196,7 +196,7 @@ msg.Warn("dev imports not resolved.") } - err = ConcurrentUpdate(conf.Imports, vpath, i) + err = ConcurrentUpdate(conf.Imports, vpath, i, conf) return err } @@ -239,7 +239,7 @@ } // ConcurrentUpdate takes a list of dependencies and updates in parallel. -func ConcurrentUpdate(deps []*cfg.Dependency, cwd string, i *Installer) error { +func ConcurrentUpdate(deps []*cfg.Dependency, cwd string, i *Installer, c *cfg.Config) error { done := make(chan struct{}, concurrentWorkers) in := make(chan *cfg.Dependency, concurrentWorkers) var wg sync.WaitGroup @@ -275,8 +275,10 @@ } for _, dep := range deps { - wg.Add(1) - in <- dep + if !c.HasIgnore(dep.Name) { + wg.Add(1) + in <- dep + } } wg.Wait()
diff --git a/repo/set_reference.go b/repo/set_reference.go index f171813..2856b89 100644 --- a/repo/set_reference.go +++ b/repo/set_reference.go
@@ -43,8 +43,10 @@ } for _, dep := range conf.Imports { - wg.Add(1) - in <- dep + if !conf.HasIgnore(dep.Name) { + wg.Add(1) + in <- dep + } } wg.Wait()