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

[Bug]: flatpak remove --unused tries to remove a required platform extension #5712

Open
4 tasks done
kparal opened this issue Mar 4, 2024 · 2 comments
Open
4 tasks done

Comments

@kparal
Copy link

kparal commented Mar 4, 2024

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.15.6

What Linux distribution are you using?

Fedora Linux

Linux distribution version

39

What architecture are you using?

x86_64

How to reproduce

I'm not sure how to replicate my setup and the problem from scratch. This is what I see on my system:

$ flatpak remove --unused

These runtimes in installation 'system' are pinned and won't be removed; see flatpak-pin(1):
  runtime/org.gnome.Sdk/x86_64/45
Info: applications using the extension org.freedesktop.Platform.VAAPI.Intel.i386 branch 23.08:
   com.valvesoftware.Steam
Really remove? [y/n]: n

Which means flatpak remove --unused doesn't behave correctly. It should only try to remove runtimes/extensions which are truly unused by anything else.

My current setup:

$ flatpak list
Name                                                 Application ID                                                 Version                  Branch                  Origin                 Installation
Bitwarden                                            com.bitwarden.desktop                                          2024.2.0                 stable                  flathub                system
Janne Pulkkinen                                      com.github.Matoking.protontricks                               1.11.1                   stable                  flathub                system
Julián Unrrein                                       com.github.junrrein.PDFSlicer                                  1.8.8                    stable                  flathub                system
Flatseal                                             com.github.tchx84.Flatseal                                     2.1.1                    stable                  flathub                system
Xournalpp Developers                                 com.github.xournalpp.xournalpp                                 1.2.3                    stable                  flathub                system
Bottles Contributors                                 com.usebottles.bottles                                         51.11                    stable                  flathub                system
Valve Corporation                                    com.valvesoftware.Steam                                        1.0.0.79                 stable                  flathub                system
Timetrack                                            net.danigm.timetrack                                           2.2.0                    stable                  flathub                system
Audacity                                             org.audacityteam.Audacity                                      3.4.2                    stable                  flathub                system
Codecs                                               org.audacityteam.Audacity.Codecs                                                        stable                  flathub                system
Avidemux                                             org.avidemux.Avidemux                                          2.8.1                    stable                  flathub                system
The Chromium Authors                                 org.chromium.Chromium                                          122.0.6261.94            stable                  flathub                system
Codecs                                               org.chromium.Chromium.Codecs                                                            stable                  flathub                system
SWH                                                  org.freedesktop.LinuxAudio.Plugins.swh                         0.4.17                   22.08                   flathub                system
Freedesktop Platform                                 org.freedesktop.Platform                                       23.08.12                 23.08                   flathub                system
i386                                                 org.freedesktop.Platform.Compat.i386                                                    23.08                   flathub                system
Mesa                                                 org.freedesktop.Platform.GL.default                            23.3.5                   22.08                   flathub                system
Mesa (Extra)                                         org.freedesktop.Platform.GL.default                            23.3.5                   22.08-extra             flathub                system
Mesa                                                 org.freedesktop.Platform.GL.default                            24.0.1                   23.08                   flathub                system
Mesa (Extra)                                         org.freedesktop.Platform.GL.default                            24.0.1                   23.08-extra             flathub                system
Mesa                                                 org.freedesktop.Platform.GL32.default                          24.0.1                   23.08                   flathub                system
Mesa (Extra)                                         org.freedesktop.Platform.GL32.default                          24.0.1                   23.08-extra             flathub                system
i386                                                 org.freedesktop.Platform.VAAPI.Intel.i386                                               23.08                   flathub                system
MangoHud                                             org.freedesktop.Platform.VulkanLayer.MangoHud                  0.7.0                    22.08                   flathub                system
ffmpeg-full                                          org.freedesktop.Platform.ffmpeg-full                                                    23.08                   flathub                system
i386                                                 org.freedesktop.Platform.ffmpeg_full.i386                                               23.08                   flathub                system
openh264                                             org.freedesktop.Platform.openh264                              2.1.0                    2.2.0                   flathub                system
Zenju                                                org.freefilesync.FreeFileSync                                  13.4                     beta                    flathub-beta           system
GNOME Application Platform version 44                org.gnome.Platform                                                                      44                      flathub                system
GNOME Application Platform version 45                org.gnome.Platform                                                                      45                      flathub                system
i386                                                 org.gnome.Platform.Compat.i386                                                          45                      flathub                system
GNOME Software Development Kit version 45            org.gnome.Sdk                                                                           45                      flathub                system
Identity                                             org.gnome.gitlab.YaLTeR.Identity                               0.6.0                    stable                  flathub                system
Adwaita theme                                        org.kde.KStyle.Adwaita                                                                  5.15-22.08              flathub                system
Adwaita theme                                        org.kde.KStyle.Adwaita                                                                  5.15-23.08              flathub                system
Adwaita theme                                        org.kde.KStyle.Adwaita                                                                  6.5                     flathub                system
KDE Application Platform                             org.kde.Platform                                                                        5.15-22.08              flathub                system
KDE Application Platform                             org.kde.Platform                                                                        5.15-23.08              flathub                system
KDE Application Platform                             org.kde.Platform                                                                        6.5                     flathub                system
QGnomePlatform                                       org.kde.PlatformTheme.QGnomePlatform                                                    5.15-22.08              flathub                system
QGnomePlatform                                       org.kde.PlatformTheme.QGnomePlatform                                                    5.15-23.08              flathub                system
QGnomePlatform                                       org.kde.PlatformTheme.QGnomePlatform                                                    6.5                     flathub                system
QAdwaitaDecorations                                  org.kde.WaylandDecoration.QAdwaitaDecorations                                           5.15-22.08              flathub                system
QAdwaitaDecorations                                  org.kde.WaylandDecoration.QAdwaitaDecorations                                           5.15-23.08              flathub                system
QAdwaitaDecorations                                  org.kde.WaylandDecoration.QAdwaitaDecorations                                           6.5                     flathub                system
QGnomePlatform-decoration                            org.kde.WaylandDecoration.QGnomePlatform-decoration                                     5.15-22.08              flathub                system
QGnomePlatform-decoration                            org.kde.WaylandDecoration.QGnomePlatform-decoration                                     5.15-23.08              flathub                system
QGnomePlatform-decoration                            org.kde.WaylandDecoration.QGnomePlatform-decoration                                     6.5                     flathub                system
Urs Fleisch                                          org.kde.kid3                                                   3.9.5                    stable                  flathub                system
Damir Porobic                                        org.ksnip.ksnip                                                1.10.1                   stable                  flathub                system
Meltytech, LLC                                       org.shotcut.Shotcut                                            24.02.29                 stable                  flathub                system
DXVK                                                 org.winehq.Wine.DLLs.dxvk                                      2.3                      stable-23.08            flathub                system
Gecko                                                org.winehq.Wine.gecko                                                                   stable-23.08            flathub                system
Mono                                                 org.winehq.Wine.mono                                                                    stable-23.08            flathub                system

Expected Behavior

flatpak remove --unused only removes truly unused refs

Actual Behavior

flatpak remove --unused tries to remove refs which are required by some apps

Additional Information

No response

@chrisawi
Copy link
Collaborator

chrisawi commented Mar 4, 2024

To clarify, do you actually have an Intel GPU? Flatpak looks for /sys/module/i915.

The Steam flatpak originally had an incorrect definition of that extension point which may have installed it excessively (but more likely, not at all). The extension point has carried autoprune-unless for a while, but it was ignored until a recent change in flatpak-builder.

The fact that uninstall --unused complains about removing autoprunable refs is a known issue, but flatpak update has been changed in git to do so itself without confirmation, so it's not a high priority bug.

@kparal
Copy link
Author

kparal commented Mar 5, 2024

Ah, I guess I might know what happened. My Intel-based (cpu+igpu) laptop broke, so I moved the disk to a replacement laptop, which is AMD-based (cpu+igpu). That's when I saw the behavior above. Now that my Intel-based laptop is repaired and I moved the disk back, I no longer see it.

Can this be an explanation for what happened? Is here something to fix, or should I just close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants