Bug 501928

Summary: Flatpak Permissions doesn't list apps installed in non-standard installation paths.
Product: [Applications] systemsettings Reporter: kde.output138
Component: kcm_flatpakAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: coding-matter, herzenschein, joshiesuhaas0, nate
Priority: NOR    
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:

Description kde.output138 2025-03-23 23:16:35 UTC
SUMMARY
"Flatpak Permissions" window doesn't list flatpaks installed in user-defined installation paths. 

STEPS TO REPRODUCE
1.  Create a new Flatpak installation path:

`sudo mkdir -p /home/shared/flatpak`

2. Create config for this path new installation path.

`sudoedit /etc/flatpak/installations.d/extra.conf`:
[Installation "extra"]
Path=/home/shared/flatpak/
DisplayName=Extra Installation
StorageType=harddisk

3. Add a Flatpak remote to this path.

`sudo flatpak --installation=extra remote-add flathub https://flathub.org/repo/flathub.flatpakrepo`
`sudo systemctl restart flatpak-system-helper`

4. Install any package from this new Flatpak remote.

5. The installed package won't show up in "Flatpak Permissions" inside the System Setttings app


EXPECTED RESULT
All Flatpaks that are listed using `flatpak list` must show up in the "Flatpak Permissions" window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.14.0-0.rc7
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Comment 1 kde.output138 2025-03-23 23:21:01 UTC
SUMMARY
"Flatpak Permissions" window doesn't list flatpaks installed in user-defined installation paths. 

STEPS TO REPRODUCE
1.  Create a new Flatpak installation path:

`sudo mkdir -p /home/shared/flatpak`

2. Create config for this new installation path.

```
sudo mkdir -p /etc/flatpak/installations.d
sudoedit /etc/flatpak/installations.d/extra.conf
```
Inside `extra.conf`:
[Installation "extra"]
Path=/home/shared/flatpak/
DisplayName=Extra Installation
StorageType=harddisk

3. Add a Flatpak remote to this path.

`sudo flatpak --installation=extra remote-add flathub https://flathub.org/repo/flathub.flatpakrepo`
`sudo systemctl restart flatpak-system-helper`

4. Install any package from this new Flatpak remote.

5. The installed package won't show up in "Flatpak Permissions" inside the System Setttings app


EXPECTED RESULT
All Flatpaks that are listed using `flatpak list` must show up in the "Flatpak Permissions" window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.14.0-0.rc7
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Comment 2 Harald Sitter 2025-03-24 12:44:47 UTC
*** Bug 475319 has been marked as a duplicate of this bug. ***
Comment 3 Harald Sitter 2025-03-24 12:44:55 UTC
*** Bug 487286 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2025-03-24 13:25:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/flatpak-kcm/-/merge_requests/142
Comment 5 Harald Sitter 2025-03-24 23:52:50 UTC
Git commit f9208e7a0f6f5cbaf759d7cede628b0571d13169 by Harald Sitter.
Committed on 24/03/2025 at 13:21.
Pushed by sitter into branch 'master'.

collect refs from all system installations

previously we'd miss extra installation directories

M  +14   -3    flatpakreference.cpp

https://invent.kde.org/plasma/flatpak-kcm/-/commit/f9208e7a0f6f5cbaf759d7cede628b0571d13169