Fixed #18919 false-positive on pkg.refresh

This commit is contained in:
twangboy 2015-07-06 14:30:38 -06:00
parent 01ed062ca7
commit 12ffcd1062

View file

@ -370,10 +370,14 @@ def refresh_db(saltenv='base'):
if not cached_repo:
# It's not cached. Cache it, mate.
cached_repo = __salt__['cp.cache_file'](repocache, saltenv)
if not cached_repo:
return False
return True
# Check if the master's cache file has changed
if __salt__['cp.hash_file'](repocache) != __salt__['cp.hash_file'](cached_repo, saltenv):
cached_repo = __salt__['cp.cache_file'](repocache, saltenv)
if not cached_repo:
return False
return True