-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Yum's setopt with Salt fails only for dom0 #9509
Using Yum's setopt with Salt fails only for dom0 #9509
Comments
Avoid qubes-dom0-update treating the setopt value as a command to dnf. Fix: QubesOS/qubes-issues#9509
I know it wouldn't be very consistent, but maybe a better approach is to adjust |
I can check if setopt item does not contain
I don't have the percentage of how many Yum options Salt covers, but not all for sure, which can cause inconsistencies. In this case, as it covers --enablerepo= with the correct separator, it doesn't cause problems. It is actually an inconsistency on the salt code to not have the if fromrepo:
...
ret.extend(["--disablerepo=*", f"--enablerepo={fromrepo}"])
else:
...
ret.extend([f"--disablerepo={x}" for x in targets])
if enablerepo:
...
ret.extend([f"--enablerepo={x}" for x in targets])
if disableexcludes:
...
ret.append(f"--disableexcludes={disableexcludes}")
if branch:
...
ret.append(f"--branch={branch}")
for item in setopt:
ret.extend(["--setopt", str(item)])
if get_extra_options:
...
ret.append(f"--{key}={value}") |
Avoid qubes-dom0-update treating the setopt value as a command to dnf. Fix: QubesOS/qubes-issues#9509
Well, as setopt was irregular compared to the other options, I believe that give us some leverage to fix it upstream as it would benefit them also to have a standard format:
But in case it is not accepted or delayed to be in a release packaged in Qubes: |
PR was merged to upstream's
This issue can be closed if just waiting for upstream. |
How to file a helpful issue
Qubes OS release
R4.2
Brief summary
On qubes-dom0-update, can't pass value of an option separated by space as it is treated differently.
This is especially problematic when the format of the command can't be controlled, such as when using Salt.
Setopt value separated by space fails:
Setopt separated by
=
works:Steps to reproduce
With the salt state:
Targetting dom0:
Targetting a fedora-40 qube:
Expected behavior
Qubes Salt module builds command line to qubes-dom0-update that doesn't fail when it is a valid dnf syntax.
Actual behavior
Same state that works on Fedora qubes fails on Dom0 due to how qubes-dom0-update interpret arguments.
The text was updated successfully, but these errors were encountered: