Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 845138 - sys-apps/xdg-desktop-portal : depend on any of xdg-desktop-portal-* implementations
Summary: sys-apps/xdg-desktop-portal : depend on any of xdg-desktop-portal-* implement...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 06:42 UTC by Shiba
Modified: 2022-10-10 18:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shiba 2022-05-17 06:42:14 UTC
As of https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-apps/flatpak?id=f1fbb39938ea84137269e202270a2b33462d9cd8 sys-apps/flatpak depends on sys-apps/xdg-desktop-portal only, which needs an implementation to work. I think this could be done either by setting them as dependencies or as a post install message.
Comment 1 Andreas Sturmlechner gentoo-dev 2022-05-17 09:11:53 UTC
*/xdg-desktop-portal-{kde,lxqt,gnome,gtk,wlr} packages all depend on xdg-desktop-portal, so this would create a circular dependency unless PDEPEND is used.

I don't think it is necessary to make a dependency here, rather it creates potential for unwanted/unsuitable portal implementation deps for someone installing sys-apps/flatpak without pre-existing portal-* package. It is up to the DEs' meta packages to provide the facilities for flatpak integration, and people who "go minimal" will be used to choose the portal impl on their own.

For them, a postinst message can be provided, otoh why spam everyone else with something they get as a dependency of their portal-* implementation. So maybe it should be made on the condition of none of the known implementations being present.
Comment 2 Shiba 2022-05-18 07:23:42 UTC
Oh I'm not using any desktop package, so I was surprised when --depclean tried to remove xdg-desktop-portal-gtk and I thought it was an unintended side effect, but that makes sense now. I'm voting in favor of the conditional postinst message, after all a portal implementation is required and this seems like a nice reminder.
Comment 3 Andreas Sturmlechner gentoo-dev 2022-10-10 16:49:48 UTC
What do others think?
Comment 4 Andreas Sturmlechner gentoo-dev 2022-10-10 16:53:42 UTC
Also, at least for Qt this change was added to fall back to native dialog in case no XDP impl available:

https://invent.kde.org/qt/qt/qtbase/-/merge_requests/177
https://bugreports.qt.io/browse/QTBUG-98988
> Add QXdgDesktopPortalFileDialog::useNativeFileDialog()
> Fallback to another file dialog implementation when XDP is inaccessible
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-10 17:09:39 UTC
(In reply to Andreas Sturmlechner from comment #3)
> What do others think?

I think it makes sense to optfeature if none of them are installed.
Comment 6 Larry the Git Cow gentoo-dev 2022-10-10 18:09:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1319a6905b4ff4ef1cba89e35c53d70691cb79b8

commit 1319a6905b4ff4ef1cba89e35c53d70691cb79b8
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-10-10 18:07:42 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-10-10 18:09:12 +0000

    sys-apps/xdg-desktop-portal: Add pkg_postinst info about XDP impls
    
    Closes: https://bugs.gentoo.org/845138
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../xdg-desktop-portal/xdg-desktop-portal-1.15.0.ebuild    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)