#925 Some .desktop files cannot be checked via desktop-file-utils
Opened 4 months ago by churchyard. Modified 4 months ago

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_desktop_files

"It is not simply enough to just include the .desktop file in the package, one MUST run desktop-file-install (in %install) OR desktop-file-validate (in %check or %install) and have BuildRequires: desktop-file-utils, to help ensure .desktop file safety and spec-compliance."

But see https://bugzilla.redhat.com/show_bug.cgi?id=1745846#c27 - not all desktop files are apparently equal.

And https://bugs.kde.org/show_bug.cgi?id=411876


In context, I think the requirements actually apply only to .desktop files intended to launch desktop applications. The section starts with this:

"If a package contains a GUI application, then it needs to also include a properly installed .desktop file."

to me it's implicit that all the following requirements apply only to that type of .desktop file - ones for GUI applications. But this could certainly be made more explicit.

I mean, there's always going to be some valid exception to any rule. See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_general_exception_policy. I don't think it productive to worry about revising the packaging guidelines to list out every possible exception unless we end up with a class of packages that would have to deviate.

The current guildeline also says "If a package contains a GUI application, then it needs to also include a properly installed .desktop file."

In context of the aforementioned bugzilla entry, this is clearly not a GUI application.

So, for a concrete constructive suggestion, it may be good enough to say to limit .desktop validation to .desktop files in well-known locations, $XDG_DATA_DIRS/applications (which defaults to /usr/local/share/applications/:/usr/share/applications )

Login to comment on this ticket.

Metadata