Fix issue when check updates for VCS repository // Resolve #917

This commit is contained in:
Ivan Kravets
2017-03-11 13:11:58 +02:00
parent 09e15f6d2a
commit f39cda041c
2 changed files with 7 additions and 2 deletions

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 3, "0a15")
VERSION = (3, 3, "0a16")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -553,6 +553,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
# skip a fixed package to a specific version
if "@" in pkg_dir and "__src_url" not in manifest:
return None
if "__src_url" in manifest:
try:
vcs = VCSClientFactory.newClient(
@ -571,14 +572,18 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
silent=True)
except (exception.PlatformioException, ValueError):
return None
if not latest:
return None
up_to_date = False
try:
assert "__src_url" not in manifest
up_to_date = (semantic_version.Version.coerce(manifest['version'])
>= semantic_version.Version.coerce(latest))
except ValueError:
except (AssertionError, ValueError):
up_to_date = latest == manifest['version']
return False if up_to_date else latest
def install(self,