Open fbruetting opened 4 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @JayKayy @oolongbrothers click here for bot help
Hi @fbruetting I was taking a look at this issue, and it does not seem like it would be too complicated to work on. Could you please:
-vvv
?I just have Ansible 2.9.23 in my non-Khazad-dûm machine (Khazad-dûm is even worse) - is this sufficient?
I can see if there is a COPR shipping more current Ansible for my Fedora.
Please note that Ansible 2.9 only receives critical security fixes, and no longer bugfixes. So you'll have to use the community.general collection instead of the modules included in Ansible 2.9 if you want this fixed.
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
The underlying issue is similar to #6265. The use of the --app
command-line option effectively means that the module is unable to handle runtimes. Removing this option allows the uninstallation to work if and only if no applications are using this runtime.
$ flatpak list --system
Name Application ID Version Branch
Fedora Media Writer org.fedoraproject.MediaWriter 5.1.2 stable
Fedora Platform org.fedoraproject.Platform 40 f40
$ ansible -m community.general.flatpak -a '{"name": "org.fedoraproject.Platform", "state": "absent"}' localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | FAILED! => {
"changed": false,
"cmd": "/usr/bin/flatpak uninstall --noninteractive --system org.fedoraproject.Platform",
"msg": "Error: Failed to uninstall org.fedoraproject.Platform: Can't remove org.fedoraproject.Platform/x86_64/f40, it is needed for: org.fedoraproject.MediaWriter",
"rc": 1,
"stderr": "Error: Failed to uninstall org.fedoraproject.Platform: Can't remove org.fedoraproject.Platform/x86_64/f40, it is needed for: org.fedoraproject.MediaWriter\n",
"stderr_lines": [
"Error: Failed to uninstall org.fedoraproject.Platform: Can't remove org.fedoraproject.Platform/x86_64/f40, it is needed for: org.fedoraproject.MediaWriter"
],
"stdout": "Info: applications using the runtime org.fedoraproject.Platform branch f40:\n org.fedoraproject.MediaWriter\nUninstalling runtime/org.fedoraproject.Platform/x86_64/f40\n",
"stdout_lines": [
"Info: applications using the runtime org.fedoraproject.Platform branch f40:",
" org.fedoraproject.MediaWriter",
"Uninstalling runtime/org.fedoraproject.Platform/x86_64/f40"
]
}
$ ansible -m community.general.flatpak -a '{"name": ["org.fedoraproject.MediaWriter", "org.fedoraproject.Platform"], "state": "absent"}' localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | CHANGED => {
"changed": true,
"command": "/usr/bin/flatpak uninstall --noninteractive --system org.fedoraproject.MediaWriter org.fedoraproject.Platform",
"rc": 0,
"stderr": "",
"stderr_lines": [],
"stdout": "Uninstalling app/org.fedoraproject.MediaWriter/x86_64/stable\nUninstalling runtime/org.fedoraproject.Platform/x86_64/f40\n",
"stdout_lines": [
"Uninstalling app/org.fedoraproject.MediaWriter/x86_64/stable",
"Uninstalling runtime/org.fedoraproject.Platform/x86_64/f40"
]
}
SUMMARY
I just can’t remove runtimes.
ISSUE TYPE
COMPONENT NAME
flatpak
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Fedora 32
STEPS TO REPRODUCE
On a new Fedora 32, you have
org.fedoraproject.Platform
andorg.gnome.Extensions
installed. When you want to delete them both, the following task would work just for the application, not for the runtime (I also tried withorg.fedoraproject.Platform/x86_64/f32
). The same way you can installorg.gnome.Platform
of theflathub
repo and also there you would not be able to uninstall it.EXPECTED RESULTS
I would expect that it works for runtimes, too.
ACTUAL RESULTS
Doesn’t work for runtimes: