mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #25196 from twangboy/pkg_refresh
Fixed #18919 false-positive on pkg.refresh
This commit is contained in:
commit
58b7d0e653
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user