Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913612 - desktop eclasses: make_desktop_entry doc improvement
Summary: desktop eclasses: make_desktop_entry doc improvement
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: https://specifications.freedesktop.or...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-04 10:54 UTC by Dominique Michel
Modified: 2023-09-04 12:30 UTC (History)
1 user (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 Dominique Michel 2023-09-04 10:54:23 UTC
The freedesktop Menu Specification provide 2 kinds of registered categories, the main ones and the additional ones.

If I put the following into an ebuild:

make_desktop_entry zita-dc1 zita-DC1 zita-dc1 AudioVideo:Audio:Engineering

the spec tell me than Engineering can be used with any main category, and than Audio must include AudioVideo as well. which imply 'AudioVideo:Audio:Engineering' is correct.

But emerge and ebuild tells me:
 * QA Notice: This package installs one or more .desktop files that do not
 * pass validation.
 * 
 * 	/usr/share/applications/zita-dc1.desktop: error: value "AudioVideo:Audio:Engineering;" for key "Categories" in group "Desktop Entry" contains an unregistered value "AudioVideo:Audio:Engineering"; values extending the format should start with "X-"

The final statement of that notice is wrong because AudioVideo, Audio and Engineering are all registered menu categories. Which imply X- doesn't apply in such a case. 

Reproducible: Always

Steps to Reproduce:
1. make_destop_entry with additional categories
2. install the software with ebuild or merge it with emerge
Actual Results:  
portage make the desktop entry as wanted, which is fine.
But the QA notice is misleading and wrong.
Comment 1 Dominique Michel 2023-09-04 11:48:34 UTC
And I made a mistake. With the above desktop entry command, the QA notice is correct because I used ':' instead of ';' semicolums.

But it is even worst with the use of

make_desktop_entry zita-dc1 'zita-Dynamic Compressor 1' zita-dc1 AudioVideo;Audio;Engineering

The result is 

 * QA Notice: command not found:
 * 
 * 	/var/tmp/portage/media-sound/zita-dc1-0.3.3/temp/environment: line 1621: Audio: command not found
 * 	/var/tmp/portage/media-sound/zita-dc1-0.3.3/temp/environment: line 1622: Engineering: command not found

So, I try to put the cats in quotes and everythins is working fine:

make_desktop_entry zita-dc1 'zita-Dynamic Compressor 1' zita-dc1 'AudioVideo;Audio;Engineering;'

One solution can be to close that bug as invalid. Another solution would be to change it into a documentation improvement for https://devmanual.gentoo.org/eclass-reference/desktop.eclass/index.html and add an example like that one.
Comment 2 Ionen Wolkens gentoo-dev 2023-09-04 12:30:43 UTC
AudioVideo;Audio;Engineering

these are separate commands, after ; it tries to execute Audio, then Engineering, not pass it to make_desktop_entry

You need to use quotes

For an example from app-emulation/ruffle:
>    make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \
>        "MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"

(can leave out the mimetype part, just an example of what you can do)