Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938658 - dev-games/godot-4.3 Wayland app_id does not match slotted desktop entry
Summary: dev-games/godot-4.3 Wayland app_id does not match slotted desktop entry
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-29 03:04 UTC by Adam King
Modified: 2024-08-29 05:16 UTC (History)
3 users (show)

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


Attachments
Proposed ebuild patch (godot-appid.patch,425 bytes, patch)
2024-08-29 03:06 UTC, Adam King
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam King 2024-08-29 03:04:40 UTC
Gentoo's Godot ebuild renames the org.godotengine.Godot.desktop file to allow for slotted installation, but the code uses unmodified app_ids, so Wayland cannot match the running windows with the desktop entry, causing Godot to run with the default Wayland taskbar icon and window icon.

I have opened a bug in Godot to address the related issue that it runs with a different app_id based on context: GitHub godotengine issue 96074 (Cannot insert URL due to new account)

But even when that is fixed Gentoo's ebuild will need to alter those app_ids too

The following patch to the ebuild should fix it for all built-in app_ids


--- a/dev-games/godot/godot-4.3.ebuild
+++ b/dev-games/godot/godot-4.3.ebuild
@@ -104,4 +104,6 @@
        sed -e "s/godot/&${SLOT}/g" \
                -i misc/dist/shell/{godot.bash-completion,godot.fish,_godot.zsh-completion} || die
+       sed -e "s/app_id = \"org.godotengine.[^\"]+/&${SLOT}/" \
+               -i platform/linuxbsd/wayland/display_server_wayland.cpp || die
 
        sed -i "s|pkg-config |$(tc-getPKG_CONFIG) |" platform/linuxbsd/detect.py || die
Comment 1 Adam King 2024-08-29 03:06:27 UTC
Created attachment 901514 [details, diff]
Proposed ebuild patch
Comment 2 Ionen Wolkens gentoo-dev 2024-08-29 03:19:07 UTC
Tend to wonder if it was worth slotting (idea was in case games would want system godot for runtime and 3 and 4 were too incompatible, but then incompatibilities happen between minor versions too -- and then we haven't packaged any games that need this anyway). And then developers "typically" only work with only one version, at most may need time to migrate on changes, but at this point could probably just drop godot3 to be spared extra maintenance burden.

May consider just undoing the slotting (maybe you have an opinion on this? I don't use godot myself beside keeping the ebuild working).

In the interim I see no reason to not do the sed though, I'll spare doing a revbump given the long build time if it's just affecting icons.
Comment 3 Ionen Wolkens gentoo-dev 2024-08-29 03:27:01 UTC
(In reply to Ionen Wolkens from comment #2)
> Tend to wonder if it was worth slotting (idea was in case games would want
> system godot for runtime and 3 and 4 were too incompatible, but then
> incompatibilities happen between minor versions too -- and then we haven't
> packaged any games that need this anyway)
Guess that if we wanted system-godot for games, it would be easier to have a separate slotted runner package or so. It wouldn't have desktop entries, tools, and be a minimal build just to run games. Not that I intend to provide if we don't really need it right now.
Comment 4 Ionen Wolkens gentoo-dev 2024-08-29 04:55:55 UTC
Yeah, upon further consideration think I'll just go ahead and do a suffix-less SLOT=0 now rather than sed. Decision to slot it (done given package was added while godot4 was being introduced) had been bothering me for a while. And godot3 (while still supported) is still becoming kind of decrepit, so I'll get rid of it. People that *really* need it can still fallback to official builds or not depclean godot:3 for the time being.
Comment 5 Larry the Git Cow gentoo-dev 2024-08-29 05:16:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=204b3f17d9c1366d1287bf066db7a0975c6e7fc5

commit 204b3f17d9c1366d1287bf066db7a0975c6e7fc5
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-08-29 03:58:17 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-08-29 05:15:42 +0000

    dev-games/godot: remove slotting support and USE=runner
    
    Mostly to be easier to maintain, see also bug #938658.
    
    Few notes:
    - use SLOT=0 to avoid looking inconsistent when godot5 exists
    - not doing slotmove given if a package in an overlay (none
      in-tree) depended on godot:4 and has a game invoke godot
      with "4" it'll be broken with this version
    - no !blocker given all this does is drop the 4 suffix, so
      no files conflict (essentially a new slot, except the old
      ones were dropped), users that didn't want a specific slot
      and using .desktop to start it won't notice a thing after
      depclean the old
    - USE=runner was intended for packaging games with system godot
      but that never really been used and games would be break too
      frequently even if we did without doing major.minor slots
      (dropping it also allows to build faster), could revisit if
      we really want this possibly with a separate godot-runner
      slotted package (aka a simplified build without much work to
      adapt to slots)
    
    Closes: https://bugs.gentoo.org/938658
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../{godot-4.3.ebuild => godot-4.3-r1.ebuild}      | 64 +++++++++-------------
 dev-games/godot/metadata.xml                       |  1 -
 2 files changed, 26 insertions(+), 39 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9340b600665afa885f4588818ea6b5dd18402c9f

commit 9340b600665afa885f4588818ea6b5dd18402c9f
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-08-29 03:33:15 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-08-29 05:15:42 +0000

    dev-games/godot: drop 3.5.3-r1, 4.2.2-r1
    
    Upon consideration, we'll no longer be slotting godot (bug
    #938658 was a trigger, but been consider undoing this for
    a long time either way).
    
    Not *essential* to remove these now given they will not
    conflict with SLOT=0, but would rather cleanup at same
    time to avoid confusion. As a bonus, it drops consumers
    of embree:3 wrt bug #938522 and a lot of patches.
    
    Considered keeping the 3.x (even unslotted) given it's still
    supported, but release cycle is slow and it issues with new
    python/gcc add to the maintenance burden. Been a while since
    godot4 been released, so hopefully most users migrated.
    
    Bug: https://bugs.gentoo.org/938522
    Bug: https://bugs.gentoo.org/938658
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-games/godot/Manifest                        |   2 -
 dev-games/godot/files/godot-3.5-musl.patch      |   9 -
 dev-games/godot/files/godot-3.5-scons.patch     |  74 --------
 dev-games/godot/files/godot-3.5.3-gcc13.patch   |   9 -
 dev-games/godot/files/godot-4.0_rc2-musl.patch  |  21 ---
 dev-games/godot/files/godot-4.0_rc3-scons.patch |  15 --
 dev-games/godot/godot-3.5.3-r1.ebuild           | 218 ----------------------
 dev-games/godot/godot-4.2.2-r1.ebuild           | 238 ------------------------
 dev-games/godot/metadata.xml                    |   2 -
 9 files changed, 588 deletions(-)