linuxmint / mintupdate

The Linux Mint Update Manager
309 stars 152 forks source link

Flatpak update of org.gnome.Platform not working in updater #846

Closed PatrLind closed 7 months ago

PatrLind commented 9 months ago

Describe the bug I can update all other flatpak updates in the update manager, but org.gnome.Platform is always left behind for some reason. I can update it manually in the command line without problem.

Screenshots See this screen recording of the issue: https://github.com/linuxmint/mintupdate/assets/4456415/7bb8b6d5-3681-47e6-8b5c-8e06c5e78ef2

To Reproduce Steps to reproduce the behavior (in my system):

  1. Open update manager
  2. Click Install Updates
  3. Everything updates except org.gnome.Platform

Expected behavior I expect the update to be installed

Distribution: Linux Mint 21.2

Software version: 6.0.3

Logs:

09.25@10:40 ++ Launching Update Manager
09.25@10:40 ++ Changes to the package cache detected, triggering refresh
09.25@10:40 ++ Initial refresh will happen in 0 day(s), 0 hour(s) and 10 minute(s)
09.25@10:40 ++ Inhibited power management
09.25@10:40 ++ Starting refresh (local only)
09.25@10:40 ++ Found 1 software updates
09.25@10:40 ++ Refresh finished
09.25@10:40 ++ Resumed power management
09.25@10:40 ++ Inhibited power management
09.25@10:40 ++ Install requested by user
09.25@10:40 ++ Resumed power management
09.25@10:40 ++ Inhibited power management
09.25@10:40 ++ Install requested by user
09.25@10:40 ++ Resumed power management
09.25@10:40 ++ Inhibited power management
09.25@10:40 ++ Install requested by user
09.25@10:40 ++ Resumed power management

Console log:

/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1368: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
harvester: Loading local applet cache
harvester: Loading metadata on installed applets
No additional desklets installed
No additional themes installed
No additional extensions installed
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1751: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:796: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()
harvester: Generating list of updated applets
flatpak-update-worker (DEBUG): 27 flatpaks installed, continuing
mint-common (DEBUG): Installer._fp_remotes_have_changed took 0.183 ms
mint-common (DEBUG): Installer: User pkgcache is most recent, using it.
mint-common (DEBUG): PkgCache._load_cache took 80.478 ms
mint-common (DEBUG): PkgCache.__init__ took 80.502 ms
mint-common (DEBUG): Installer.initialize_appstream took 0.165 ms
mint-common (DEBUG): Installer.generate_uncached_pkginfos took 2.338 ms
flatpak-update-worker (DEBUG): cache valid
mint-common (DEBUG): Installer.generate_uncached_pkginfos took 1.814 ms
flatpak-update-worker (DEBUG): generating updates
mint-common (DEBUG): Installer: Calculating Flatpak updates.
mint-common (DEBUG): Adding prior ref version for runtime/org.gnome.Platform.Locale/x86_64/45: installing
mint-common (DEBUG): Adding prior ref version for runtime/org.gnome.Platform/x86_64/45: installing
mint-common (DEBUG): For install:
mint-common (DEBUG): runtime/org.gnome.Platform.Locale/x86_64/45
mint-common (DEBUG): runtime/org.gnome.Platform/x86_64/45
flatpak-update-worker (DEBUG): task object: <mintcommon.installer.installer.InstallerTask object at 0x7fcd158d75b0> transaction: <mintcommon.installer._flatpak.FlatpakTransaction object at 0x7fcd158d7670>
flatpak-update-worker (DEBUG): Install:  runtime/org.gnome.Platform/x86_64/45
flatpak-update-worker (DEBUG): Install:  runtime/org.gnome.Platform.Locale/x86_64/45
flatpak-update-worker (DEBUG): done generating updates
Flatpak: done generating updates
flatpak-update-worker (DEBUG): 27 flatpaks installed, continuing
flatpak-update-worker (DEBUG): creating real update task
mint-common (DEBUG): Installer: Calculating Flatpak updates.
flatpak-update-worker (DEBUG): receiving from updater: 'confirm'
mint-common (DEBUG): No work to perform now - are you online still?
flatpak-update-worker (DEBUG): 27 flatpaks installed, continuing
flatpak-update-worker (DEBUG): creating real update task
mint-common (DEBUG): Installer: Calculating Flatpak updates.
flatpak-update-worker (DEBUG): receiving from updater: 'confirm'
mint-common (DEBUG): No work to perform now - are you online still?
flatpak-update-worker (DEBUG): 27 flatpaks installed, continuing
flatpak-update-worker (DEBUG): creating real update task
mint-common (DEBUG): Installer: Calculating Flatpak updates.
flatpak-update-worker (DEBUG): receiving from updater: 'confirm'
mint-common (DEBUG): No work to perform now - are you online still?

Additional context It works on my other computer with the same installation...

I traced the issue to these lines of code: self.task.confirm() returns False, so the else case gets called. I don't really have any experience with Python, so I'm not sure how to figure out why self.task.confirm() returns False.

    def confirm_start(self):
        if self.task.confirm():
            self.send_to_updater("yes")
        else:
            self.send_to_updater("no")
            self.quit()

Here: https://github.com/linuxmint/mintupdate/blob/dd23d405019c1fbae790fdb0aa8a1a69cadc8352/usr/lib/linuxmint/mintUpdate/flatpak-update-worker.py#L253

LinuxOnTheDesktop commented 8 months ago

Same problem, seemingly, here: clicking 'install updates' does not install anything. Or rather it seemed not too - MintUpdate kept showing the same updates when I clicked 'refresh'; but now, when I close and re-run MintUpdate, and why I try to update flatpaks via the terminal, I find that the updates have been installed. Weird.

PatrLind commented 8 months ago

I think I found out why this happened to me, and it seems to be fixed for now. The issue (in my case) seems to have been caused by some version conflict with org.gnome.Platform. Apparently every time I would start my computer Flatpak would uninstall any "unused" packages. But when the updater was running, it would re-install those "unused" packages, because they were used. My solution was to manually install those packages so they aren't uninstalled all the time.

LinuxOnTheDesktop commented 7 months ago

@PatrLind

My solution was to manually install those packages so they aren't uninstalled all the time.

Thanks for the information. I have the problem with the 'fwupd' flatpak, which I installed manually. Perhaps though I miss something.