Merge pull request #25196 from twangboy/pkg_refresh

Fixed #18919 false-positive on pkg.refresh
This commit is contained in:
Shane Lee 2015-07-06 18:24:13 -06:00
commit 58b7d0e653

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