Bug 464206

Summary: Opening local .flatpakref files is broken
Product: [Applications] Discover Reporter: Nate Graham <nate>
Component: Flatpak BackendAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, jgrulich, travier
Priority: NOR Keywords: regression
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 401832    

Description Nate Graham 2023-01-12 17:10:56 UTC
This apparently used to work; see Bug 401832.

Tried to test that out today, and found that it's broken; when I download https://dl.flathub.org/repo/appstream/org.kde.gcompris.flatpakref and open it in Discover, I see a PassiveNotification (boo, I thought we got rid of all of these!!!) saying "Could not open file:///home/nate/Desktop/org.kde.gcompris.flatpakref"

Console output is just this:

nate@Liberator:~/kde/src/discover$ (master) plasma-discover /home/nate/Desktop/org.kde.gcompris.flatpakref 
adding empty sources model QStandardItemModel(0x11ecfe0)
Comment 2 Aleix Pol 2023-01-21 01:24:54 UTC
Git commit 5bbba428263d5f249c97448b5ab5c88e1f77133a by Aleix Pol.
Committed on 20/01/2023 at 16:16.
Pushed by apol into branch 'master'.

flatpak: Fix loading flatpakref files

Drop assumptions of flatpak id being the same as the appstream id.

M  +29   -10   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.cpp
M  +17   -1    libdiscover/backends/FlatpakBackend/tests/FlatpakTest.cpp

https://invent.kde.org/plasma/discover/commit/5bbba428263d5f249c97448b5ab5c88e1f77133a
Comment 3 Aleix Pol 2023-01-21 01:25:38 UTC
Git commit b99b2daf831186dc2d6b342a53bc0f49f5b2d496 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 21/01/2023 at 01:25.
Pushed by apol into branch 'Plasma/5.27'.

flatpak: Fix loading flatpakref files

Drop assumptions of flatpak id being the same as the appstream id.


(cherry picked from commit 5bbba428263d5f249c97448b5ab5c88e1f77133a)

M  +29   -10   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.cpp
M  +17   -1    libdiscover/backends/FlatpakBackend/tests/FlatpakTest.cpp

https://invent.kde.org/plasma/discover/commit/b99b2daf831186dc2d6b342a53bc0f49f5b2d496