mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
ensure source repo line is always set as requested
This commit is contained in:
parent
8235409c51
commit
124ade43b3
1 changed files with 2 additions and 6 deletions
|
@ -2932,6 +2932,7 @@ def mod_repo(repo, saltenv="base", aptkey=True, **kwargs):
|
|||
if "comments" in kwargs:
|
||||
kwargs["comments"] = salt.utils.pkg.deb.combine_comments(kwargs["comments"])
|
||||
|
||||
repo_source_entry = SourceEntry(repo)
|
||||
if not mod_source:
|
||||
mod_source = SourceEntry(repo)
|
||||
if "comments" in kwargs:
|
||||
|
@ -2940,12 +2941,7 @@ def mod_repo(repo, saltenv="base", aptkey=True, **kwargs):
|
|||
elif "comments" in kwargs:
|
||||
mod_source.comment = kwargs["comments"]
|
||||
|
||||
if HAS_APT:
|
||||
# workaround until python3-apt supports signedby
|
||||
if str(mod_source) != str(SourceEntry(repo)) and "signed-by" in str(mod_source):
|
||||
rline = SourceEntry(repo)
|
||||
mod_source.line = rline.line
|
||||
|
||||
mod_source.line = repo_source_entry.line
|
||||
if not mod_source.line.endswith("\n"):
|
||||
mod_source.line = mod_source.line + "\n"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue