mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix for duplicate entries with pkrepo.managed
pkgrepo.managed creates duplicate entries every time salt runs when the same repository is set up twice, with different file attributes. This change simply removes the file attributes before comparing if the repo already exists. This might be related to #22412.
This commit is contained in:
parent
bd2178cd5f
commit
9653363131
1 changed files with 3 additions and 0 deletions
|
@ -377,6 +377,9 @@ def managed(name, ppa=None, **kwargs):
|
|||
repo = salt.utils.pkg.deb.strip_uri(repo)
|
||||
|
||||
if pre:
|
||||
#22412: Remove file attribute in case same repo is set up multiple times but with different files
|
||||
pre.pop('file', None)
|
||||
sanitizedkwargs.pop('file', None)
|
||||
for kwarg in sanitizedkwargs:
|
||||
if kwarg not in pre:
|
||||
if kwarg == 'enabled':
|
||||
|
|
Loading…
Add table
Reference in a new issue