Fix to print correct pkg dependecy
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/437fbb55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/437fbb55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/437fbb55 Branch: refs/heads/master Commit: 437fbb55c542c9d147e34446644b78cc79dc8c21 Parents: 1193ecc Author: Fabio Utzig <ut...@utzig.org> Authored: Tue Mar 7 18:29:49 2017 -0300 Committer: Fabio Utzig <ut...@utzig.org> Committed: Tue Mar 7 18:29:49 2017 -0300 ---------------------------------------------------------------------- newt/resolve/resolve.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/437fbb55/newt/resolve/resolve.go ---------------------------------------------------------------------- diff --git a/newt/resolve/resolve.go b/newt/resolve/resolve.go index 283e96c..6e03592 100644 --- a/newt/resolve/resolve.go +++ b/newt/resolve/resolve.go @@ -131,12 +131,12 @@ func NewResolvePkg(lpkg *pkg.LocalPackage) *ResolvePackage { } } -func (r *Resolver) resolveDep(dep *pkg.Dependency) (*pkg.LocalPackage, error) { +func (r *Resolver) resolveDep(dep *pkg.Dependency, depender string) (*pkg.LocalPackage, error) { proj := project.GetProject() if proj.ResolveDependency(dep) == nil { return nil, util.FmtNewtError("Could not resolve package dependency: "+ - "%s; depender: %s", dep.String(), dep.Name) + "%s; depender: %s", dep.String(), depender) } lpkg := proj.ResolveDependency(dep).(*pkg.LocalPackage) @@ -284,13 +284,14 @@ func (r *Resolver) loadDepsForPkg(rpkg *ResolvePackage) (bool, error) { changed := false newDeps := newtutil.GetStringSliceFeatures(rpkg.Lpkg.PkgV, features, "pkg.deps") + depender := rpkg.Lpkg.Name() for _, newDepStr := range newDeps { newDep, err := pkg.NewDependency(rpkg.Lpkg.Repo(), newDepStr) if err != nil { return false, err } - lpkg, err := r.resolveDep(newDep) + lpkg, err := r.resolveDep(newDep, depender) if err != nil { return false, err }