Fixes #289.
This commit is contained in:
parent
d192de6511
commit
2886059817
2 changed files with 6 additions and 5 deletions
|
|
@ -298,11 +298,11 @@ proc processDeps(pkginfo: PackageInfo, options: Options): seq[string] =
|
|||
for p in result:
|
||||
let pkgInfo = getPkgInfo(p, options)
|
||||
if pkgsInPath.hasKey(pkgInfo.name) and
|
||||
pkgsInPath[pkgInfo.name] != pkgInfo.myVersion:
|
||||
pkgsInPath[pkgInfo.name] != pkgInfo.version:
|
||||
raise newException(NimbleError,
|
||||
"Cannot satisfy the dependency on $1 $2 and $1 $3" %
|
||||
[pkgInfo.name, pkgInfo.myVersion, pkgsInPath[pkgInfo.name]])
|
||||
pkgsInPath[pkgInfo.name] = pkgInfo.myVersion
|
||||
[pkgInfo.name, pkgInfo.version, pkgsInPath[pkgInfo.name]])
|
||||
pkgsInPath[pkgInfo.name] = pkgInfo.version
|
||||
|
||||
# We add the reverse deps to the JSON file here because we don't want
|
||||
# them added if the above errorenous condition occurs
|
||||
|
|
|
|||
|
|
@ -211,8 +211,9 @@ proc findPkg*(pkglist: seq[tuple[pkginfo: PackageInfo, meta: MetaData]],
|
|||
for pkg in pkglist:
|
||||
if cmpIgnoreStyle(pkg.pkginfo.name, dep.name) != 0 and
|
||||
cmpIgnoreStyle(pkg.meta.url, dep.name) != 0: continue
|
||||
if withinRange(newVersion(pkg.pkginfo.version), dep.ver):
|
||||
if not result or newVersion(r.version) < newVersion(pkg.pkginfo.version):
|
||||
if withinRange(newVersion(pkg.pkginfo.myVersion), dep.ver) or
|
||||
withinRange(newVersion(pkg.pkginfo.version), dep.ver):
|
||||
if not result or newVersion(r.version) < newVersion(pkg.pkginfo.myVersion):
|
||||
r = pkg.pkginfo
|
||||
result = true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue