mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25196 from twangboy/pkg_refresh
Fixed #18919 false-positive on pkg.refresh
This commit is contained in:
commit
58b7d0e653
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue