Merge pull request #89 from yan12125/cache-vcs-by-name

Use the name as the fallback cache key for vcs packages
This commit is contained in:
依云 2018-12-16 13:24:37 +08:00 committed by GitHub
commit 377242f70b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,12 +7,16 @@ import os.path as _path
from pkg_resources import parse_version
import structlog
from . import conf_cacheable_with_name
logger = structlog.get_logger(logger_name=__name__)
_self_path = _path.dirname(_path.abspath(__file__))
_cmd_prefix = ['/bin/bash', _path.join(_self_path, 'vcs.sh')]
PROT_VER = 1
get_cacheable_conf = conf_cacheable_with_name('vcs')
def _parse_oldver(oldver):
if oldver is None:
return PROT_VER, 0, ''