#1098988 spring: desktop entry relies on PATH with name clash

Package:
spring
Source:
spring
Description:
modern full-3D RTS game engine
Submitter:
Chris Hofstaedtler
Date:
2025-02-28 07:51:02 UTC
Severity:
normal
Tags:
#1098988#5
Date:
2025-02-27 00:12:48 UTC
From:
To:
Your package "spring" installs its main program into
/usr/games/spring. It also installs a .desktop file, specifying
Exec=spring. Thus, it relies on "spring" to be unique in the
users PATH.

This is not the case for the whole distribution.

The "ruby-spring" package can be installed simultaneously and
installs /usr/bin/spring. Your desktop entry will the launch the
"ruby-spring" program instead.

It is unclear how to best resolve this. Personally, I think you
should install your program into /usr/bin, picking a new name.

See the debian-policy bug 1098948 for related discussion.

If you disagree that your package should change, please reassign
this bug to *both* packages, and CC: the other maintainer.

Chris

#1098988#12
Date:
2025-02-28 07:46:34 UTC
From:
To:
[Chris Hofstaedtler]

While that would be a good solution, I suspect it should involve a
change upstream to ensure consistency across Linux distributions.

A less intrusive solution would be to patch the desktop file, ie like this:

diff --git a/cont/freedesktop/applications/spring.desktop b/cont/freedesktop/applications/spring.desktop
index ce592432..40fbd70d 100755
--- a/cont/freedesktop/applications/spring.desktop
+++ b/cont/freedesktop/applications/spring.desktop
@@ -4,7 +4,7 @@ MimeType=application/x-spring-demo;x-scheme-handler/spring;
 Comment=An open source RTS with similar gameplay to TA
 Comment[de]=Open-Source Multiplayerstrategie
 Comment[it]=Un gioco di strategia in tempo reale multi giocatore simile a TA
-Exec=spring %u
+Exec=/usr/games/spring %u
 Icon=spring
 Terminal=false
 Type=Application

This will of course not help command line users with both packages
installed, which might be surprised what is first in PATH.