flattool/warehouse

Downgrading defaults to disabling updates using masking, which also prevents downgrades; further downgrades silently fail

Closed this issue · 1 comments

  • I have read the README.md document
  • I am using the latest version of Warehouse
  • I am using the Flatpak package of Warehouse
  • I have not found any other opened issues on the same topic

Describe the issue in detail

This started as a follow-up to #91. As the video below shows, it seems that dates are not correctly reflected in the properties of downgraded packages (or maybe only SDKs?).

However, it turns out the date itself is not the root cause of the problem. I think what is going on is that by default, downgrades enable the masking / version locking feature, and that it prevents further downgrades, not just upgrades.

If applicable, provide steps to reproduce the issue

  1. Downgrade something (ex: the GNOME Nightly SDK) to a previous version. Let the app default to its enabled "Disable updates" setting in that GUI.
  2. Try to downgrade it again, to an even older version.

Result: the app silently fails to do any further downgrades, and the only hint about that is the mismatching date in the properties:

Warehouse.multi-downgrades.bug.webm

I'd expect the app to be able to downgrade repeatedly even if it masked/locked the version number, because downgrading is a manual action on my part. Prompt the user for confirmation if you have to, but I think it could just silently unlock-and-relock the masking (depending on previous masking state) on downgrade, without prompting.

Run flatpak run io.github.flattool.Warehouse in a terminal and if applicable, show any output

When I ask it to downgrade to the GNOME Nightly SDK version from 2024-06-15, only this is printed in the terminal:

['flatpak-spawn', '--host', 'flatpak', 'update', 'org.gnome.Sdk/x86_64/master', '--commit=bbec32e048d4f23181340d9fd1490cbb0de88b2884d7fbfbb21e20c10bd82f60', '--user', '-y']

Thank you very much for spotting this issue. The repo has been updated to fix this. I unmask the flatpak before updating, silly me for overlooking that. A plus to this change is that on --system remotes, a user no longer needs to enter their password twice to downgrade and mask, they only need to enter it once.