Skip to content
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

Clean up obsolete appstream data #684

Open
mcrha opened this issue Nov 19, 2024 · 1 comment
Open

Clean up obsolete appstream data #684

mcrha opened this issue Nov 19, 2024 · 1 comment

Comments

@mcrha
Copy link

mcrha commented Nov 19, 2024

It can happen either when users update packages which installed appstream data from version using libappstream-glib to using appstream, thus effectively moving the source of the truth from the /var/cache/app-info/ to the /var/cache/swcatalog/, or when upgrading the system to the next major version (both can happen when moving to PackageKit 1.2.8), it can left the obsolete /var/cache/app-nfo/ data as is, in a never-be-updated-again state. I d not think PackageKit should take care of this, because it does not know the destination path, where the appstream installs the data.

I suggest, when installing appstream data to the /var/cache/swcatalog/, to also clean up corresponding directories and files, which would be otherwise installed under the /var/cache/app-info/. You know the origin name, and everything is saved under it, thus it should be simple to do. Ideally, when installing either the .xml or the icons, delete both of them in the old path, if any exists.

Example: no my machine, which had been upgraded from Fedora 39 to Fedora 40, I see in the obsolete path:

/var/cache/app-info/xmls/rpmfusion-nonfree-steam.xml
/var/cache/app-info/icons/rpmfusion-nonfree-steam/...

and in the new path:

/var/cache/swcatalog/xml/rpmfusion-nonfree-steam.xml

The old path for the rpmfusion-nonfree-steam should be removed when the "same" (newer) data is installed to the new path.

@scaronni
Copy link

Some more context on this.

On upgraded systems, the information in the old path gets listed in the Gnome Software interface. On some systems
I have that have been upgraded across many releases, I see data from fedora 35 to the latest 41, where the default is actually the oldest. The user has then to click under the main Install button of the software piece to select the proper version.

This affects also user searches, as the item shown is actually the oldest metadata available.

Considering that once using appstream the content of /var/cache/app-info/ folder should be wiped out as it's no longer touched by any piece of software.

Repository owner deleted a comment from kosai-ksdfounder Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants