Bug 2056082 - Enable autoremove support in gnome-software
Summary: Enable autoremove support in gnome-software
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-software
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-18 17:58 UTC by Daniel Rusek
Modified: 2022-06-02 01:33 UTC (History)
5 users (show)

Fixed In Version: gnome-software-42~beta-3.fc37 gnome-software-42.2-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-21 09:31:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Rusek 2022-02-18 17:58:30 UTC
Description of problem:
PackageKit 1.2.5 was released yesterday (and is already in Rawhide) and finally adds support for autoremove flag when removing packages (see first link in Additional info).

It should work in gnome-software after enabling "packagekit_autoremove" meson build option (see second link in Additional info).

Please, consider enabling this build option on Fedora (Rawhide for now). It should hopefully be safe, however some testing would probably be needed to make sure it works properly and does not end up breaking user's system. Basically, it should work the same as when running "dnf remove <package>" - dependencies related to the package that are not needed anymore are removed.

Additional info:
https://github.com/PackageKit/PackageKit/commit/3d6d285c626e6941581c7bee337a012428c943df#diff-7ee66c4f1536ac84dc5bbff1b8312e2eef24b974b3e48a5c5c2bcfdf2eb8f3ceR40

https://gitlab.gnome.org/GNOME/gnome-software/-/blob/main/meson_options.txt#L5

Comment 1 Milan Crha 2022-02-21 09:02:53 UTC
Thanks for a bug report. Okay, I can enable the build option. There's no way for the user to change the behavior, in contrast to the DNF, but let's see whether it'll cause any trouble.

Comment 2 Daniel Rusek 2022-02-24 14:18:25 UTC
I have just tested this on a clean, latest Rawhide installation and it seems to work fine. Uninstalling a package using Software correctly resulted in its unneeded dependencies also being removed and there was no system breakage or other bad things. :-)


For example, here is a log from removing gnome-boxes using Software:

úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package gnome-boxes;42~alpha-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-gobject;4.0.0-4.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-kvm;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-storage;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-qemu;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-network;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-nodedev;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-interface;8.0.0-2.fc36;x86_64;installed was removing for uid 1000
<full log truncated>
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package mdevctl;1.1.0-3.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package dnsmasq;2.86-5.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package lzop;1.04-8.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package systemd-container;250.3-4.fc37;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-gconfig;4.0.0-4.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package gvncpulse;1.3.0-2.fc36;x86_64;installed was removing for uid 1000
úno 24 15:11:51 fedora PackageKit[1172]: remove-packages transaction /59_dabcbade from uid 1000 finished with success after 20469ms

Comment 3 h2d2fyzt 2022-05-15 21:10:23 UTC
I found out that the `-Dpackagekit_autoremove=true` flag is missing in gnome-software.spec from the Fedora 36 branch. Will this fix be backported?

Comment 4 Daniel Rusek 2022-05-15 21:38:44 UTC
I may be wrong, but I think that the plan was to enable it in Rawhide/Fedora 37 since it got enabled when F36 was already branched. :-)

Comment 5 Milan Crha 2022-05-16 06:31:53 UTC
Correct, it was "safer" to do it only in the rawhide, thus f37 at that time, also because it was not clear when/whether the PackageKit will be updated in the f36, because the option makes sense only with a patched PackageKit.

Comment 6 h2d2fyzt 2022-05-18 05:19:56 UTC
PackageKit-1.2.5-1.fc36.x86_64 is currently installed here in F36 and the autoremove support was introduced in 1.2.4: https://github.com/PackageKit/PackageKit/commit/3d6d285c626e6941581c7bee337a012428c943df#diff-7ee66c4f1536ac84dc5bbff1b8312e2eef24b974b3e48a5c5c2bcfdf2eb8f3ceR40

Comment 7 h2d2fyzt 2022-05-18 05:21:14 UTC
Correction: was introduced in 1.2.5, so the proper version of PackageKit is already available in the F36 branch.

Comment 8 h2d2fyzt 2022-05-18 05:22:04 UTC
https://src.fedoraproject.org/rpms/PackageKit

Comment 9 Milan Crha 2022-05-18 06:25:25 UTC
Okay, I do not mind that much, it can be reverted if needed. I prepared the change locally. Unless anything bad happens it'll be included together with the next upstream release/update in f36.

Comment 10 Fedora Update System 2022-05-30 16:13:44 UTC
FEDORA-2022-b5b948abe2 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b5b948abe2

Comment 11 Fedora Update System 2022-06-01 02:28:51 UTC
FEDORA-2022-b5b948abe2 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-b5b948abe2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b5b948abe2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-06-02 01:33:11 UTC
FEDORA-2022-b5b948abe2 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.