Flatpak upgrade -y does not work

I am having an issue with using the flatpak upgrade -y option in Virtualbox-Whonix Workstation sysmaint session.

flatpak upgrade -y
Warning: Failed to get revokefs-fuse socket from system-helper: Flatpak system operation GetRevokefsFd not allowed for user
Warning: Flatpak system operation Deploy not allowed for user
Warning: Failed to get revokefs-fuse socket from system-helper: Flatpak system operation GetRevokefsFd not allowed for user
Error: Flatpak system operation Deploy not allowed for user
Updates complete.
error: There were one or more errors
zsh: exit 1     flatpak upgrade -y

ā€œflatpak upgradeā€ works normally.

I do not see documentation on this on http://www.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Sysmaint or http://www.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Install_Software#Flatpak . So I do not know if this restriction is intentional or not.

1 Like

There are intentional restrictions modifying system-wide Flatpaks as a non-root user. The code that does this is here:

If you’re running flatpak in sysmaint mode to manage system-wide Flatpaks, it should be run using sudo (or otherwise run as root).

2 Likes

I run ā€œflatpak upgradeā€ without root just fine in the sysmaint workstation. There is a popup that quickly shows up, but before I can see it, it disappears. So it is news to me that I have to run flatpak update as root in the workstation.

[workstation sysmaint ~]% flatpak upgrade
Looking for updates...

Nothing to do.

I have tried running it in the user workstation before, but it does not work.
(off-topic but might be interesting to note- I can update python packages via pipx in the user workstation and am not limited to the sysmaint workstation for that)

1 Like

Polkit, which flatpak is using, is functional in sysmaint sysmaint and will permit it for account sysmaint, which is a member of Linux user group sudo.

Related:

2 Likes

Hmm, I assumed polkit wouldn’t let flatpak be used as non-root under sysmaint because of the errors the user was getting. I probably should have read the code more carefully before replying. Maybe when not using -y, flatpak uses polkit APIs that may require authentication, and those pass, but when using -y, flatpak tries to use non-interactive APIs, and those fail? (This is pure speculation)

2 Likes