Skip to content

Commit 5359a9e

Browse files
committed
Add a polkit rule to allow background metadata/appstream updates
for inactive users. - Log in any two users. - Terminate mintupdate but remain in that session. - Delete ~/.cache/mintinstall/pkginfo.json - Run 'sleep 10 && mintupdate' - Switch to the other session within 10 seconds (ctrl-alt-f7/f8?) - Switch back after 20 or so seconds, observe authentication prompt waiting to download appstream info during flatpak updates check. Ref: linuxmint/cinnamon#12847 linuxmint/cinnamon#12728 In my testing, I was unable to reproduce some of the side-effects reported (having to hard-reset, etc...) - I was able to cancel or complete the authentication dialog if I switched back to the test session soon enough, but this should hopefully avoid those prompts appearing altogether.
1 parent 6128f73 commit 5359a9e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
polkit.addRule(function(action, subject) {
2+
if (action.id == "org.freedesktop.Flatpak.metadata-update" ||
3+
action.id == "org.freedesktop.Flatpak.appstream-update") {
4+
return polkit.Result.YES;
5+
}
6+
7+
return polkit.Result.NOT_HANDLED;
8+
});

test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
sudo rm -rf /usr/lib/linuxmint/common
44
sudo rm -rf /usr/lib/python3/dist-packages/mintcommon
55
sudo cp -R usr /
6+
sudo cp -R etc /

0 commit comments

Comments
 (0)