Bug 485886 - Flatpak branch end of life, Discover won't let me upgrade
Summary: Flatpak branch end of life, Discover won't let me upgrade
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 5.27.8
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 467981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-21 10:36 UTC by Philipp Kiemle
Modified: 2024-05-18 15:20 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Kiemle 2024-04-21 10:36:43 UTC
SUMMARY
Flatpak would not upgrade, despite showing as upgradable. Running `flatpak update` manually revealed that the branch was "end of life"

STEPS TO REPRODUCE
1. Have the Flatpak "com.github.Eloston.UngoogledChromium" installed, version 123.0.6312.105
2. Check for updates in Discover -> Flatpak shows up, there is an update available.
3. Click on "Upgrade all" in Discover (unsure of the actual button label, since I use the German language: Button to apply upgrades, not the one to check if upgrades are available)

OBSERVED RESULT
The list of upgradable packages gets blank for a second, then the above-mentioned Flatpak reappears. No upgrade was performed.

When running `flatpak update` in the command line, I get the following prompt:
```
Info: app com.github.Eloston.UngoogledChromium branch stable is end-of-life, in favor of io.github.ungoogled_software.ungoogled_chromium branch stable
Replace? [Y/n]:
```

EXPECTED RESULT
The Flatpak gets updated and does not reappear. Or at least some warning/error with instructions on what to do next.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 23.10
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.0-28-generic (64-bit)
Comment 1 Harald Sitter 2024-04-29 15:01:39 UTC
We don't implement https://docs.flatpak.org/en/latest/libflatpak-api-reference.html#FlatpakInstalledRef--end-of-life-rebase

incoming arguments are

flathub runtime/com.github.Eloston.UngoogledChromium.Codecs/x86_64/stable The application has been renamed to io.github.ungoogled_software.ungoogled_chromium runtime/io.github.ungoogled_software.ungoogled_chromium.Codecs/x86_64/stable 0x73a71c122c00

supposedly we need to manipulate the transaction to install the rebased_to_ref instead. Though probably also have to tell the user about this.
Comment 2 Harald Sitter 2024-04-29 16:01:43 UTC
I have a prototype of sorts locally. I'll try to get some related enhancements landed first though.
Comment 3 Harald Sitter 2024-05-07 07:56:08 UTC
*** Bug 467981 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2024-05-13 10:26:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/839
Comment 5 Harald Sitter 2024-05-17 14:25:42 UTC
Git commit 370a22daaded23f4a754fb5168cb582ed34a9d14 by Harald Sitter.
Committed on 17/05/2024 at 14:22.
Pushed by sitter into branch 'master'.

flatpak: handle end_of_lifed_with_rebase

when end_of_lifed_with_rebase is called we need to render a decision on
whether to move to the replacement for the EOL flatpak or not. we do
this in two ways

1) runtime/ is always auto-transitioned because we consider this
implementation details that dont need surfacing to the user
2) everything else (i.e. app/) surfaces a proceed request via the
existing job interface

since we are dealing with a transaction thread the implementation uses a
bog standard waitcondition to implement the blocking aspect of this
(i.e. the callback doesn't return until the user made a proceed decision
causing the wait condition to get awoken)

M  +8    -0    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
M  +1    -0    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
M  +61   -7    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +9    -0    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h

https://invent.kde.org/plasma/discover/-/commit/370a22daaded23f4a754fb5168cb582ed34a9d14