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 import sys
VERSION = (3, 3, "0a15") VERSION = (3, 3, "0a16")
__version__ = ".".join([str(s) for s in VERSION]) __version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio" __title__ = "platformio"

View File

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