Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 0b83286

Browse files
committed
Merge pull request #264 from autopulated/master
fix #260
2 parents 010dfe3 + b0135b8 commit 0b83286

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

yotta/lib/access.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,15 @@ def satisfyVersionFromSearchPaths(name, version_required, search_paths, update=F
239239
versions of the found component, and update it in-place (unless it was
240240
installed via a symlink).
241241
'''
242-
spec = sourceparse.parseSourceURL(version_required).semanticSpec()
243242
v = None
244243

245244
try:
246-
local_version = searchPathsFor(name, spec, search_paths, type)
245+
local_version = searchPathsFor(
246+
name,
247+
sourceparse.parseSourceURL(version_required).semanticSpec(),
248+
search_paths,
249+
type
250+
)
247251
except pack.InvalidDescription as e:
248252
logger.error(e)
249253
return None
@@ -252,7 +256,7 @@ def satisfyVersionFromSearchPaths(name, version_required, search_paths, update=F
252256
if local_version:
253257
if update and not local_version.installedLinked():
254258
#logger.debug('attempt to check latest version of %s @%s...' % (name, version_required))
255-
v = latestSuitableVersion(name, spec, registry=_registryNamespaceForType(type))
259+
v = latestSuitableVersion(name, version_required, registry=_registryNamespaceForType(type))
256260
if local_version:
257261
local_version.setLatestAvailable(v)
258262

yotta/test/cli/install.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
}
7474
],
7575
"dependencies": {
76-
"test-testdep-b": "*",
76+
"test-testdep-b": "0.0.8",
7777
"test-testdep-c": "*",
7878
"test-testdep-d": "*"
7979
},
@@ -202,6 +202,9 @@ def test_installComplexDeps(self):
202202
self.assertNotIn('test-testdep-j', stdout)
203203
self.assertNotIn('test-testdep-k', stdout)
204204

205+
# test update
206+
stdout = self.runCheckCommand(['--target', Test_Target, 'up'], test_dir)
207+
205208
rmRf(test_dir)
206209

207210
@unittest.skipIf(not hasGithubConfig(), "a github authtoken must be specified for this test (run yotta login, or set YOTTA_GITHUB_AUTHTOKEN)")

0 commit comments

Comments
 (0)