Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201498 - make repoman run desktop-file-validate on .desktop files
Summary: make repoman run desktop-file-validate on .desktop files
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL: http://dev.gentoo.org/~betelgeuse/des...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2007-12-06 17:51 UTC by Petteri Räty (RETIRED)
Modified: 2007-12-30 17:31 UTC (History)
2 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 Petteri Räty (RETIRED) gentoo-dev 2007-12-06 17:51:49 UTC
We have lots of .desktop files in files/ so we should make repoman run desktop-file-validate on them if it's installed. Perhaps add a qa use flag to pull it in. Here are the current results:
http://dev.gentoo.org/~betelgeuse/desktop-files/results.txt
The script used to create these: http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop
Comment 1 Zac Medico gentoo-dev 2007-12-06 18:04:42 UTC
Is there any significant benefit to distributing a pre-generated .desktop file vs. generating one on-the-fly using make_desktop_entry from eutils.eclass? If not, perhaps we should just have repoman complain about any .desktop files in ${FILESDIR}.

If there's something that makes make_desktop_entry() insufficient in lots of cases, maybe we can fix those shortcomings.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-12-06 18:14:52 UTC
(In reply to comment #1)
> Is there any significant benefit to distributing a pre-generated .desktop file
> vs. generating one on-the-fly using make_desktop_entry from eutils.eclass? If
> not, perhaps we should just have repoman complain about any .desktop files in
> ${FILESDIR}.
> 

At least translations come to mind.
Comment 3 Ulrich Müller gentoo-dev 2007-12-07 00:33:47 UTC
Apart from translations, "make_desktop_entry" supports only a small subset of the desktop entry keys mentioned in <http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html>.

My personal statistics is not very large, but in 3 of 3 cases I couldn't use make_desktop_entry because it was not flexible enough:
- no support for a "Comment" different from $DESCRIPTION (needed because the
  ebuild installs two desktop files),
- no support for "MimeType", "NoDisplay", and "Terminal" keys.

Also, in case of "Exec" being anything other than a simple command (i.e. if it is a full path or has arguments), the generated file has a strange name. For example, "_usr_bin_emacsclient_-a__usr_bin_emacs_%F-emacs-desktop.desktop".

(In reply to comment #1)
> [...] perhaps we should just have repoman complain about any .desktop files
> in {FILESDIR}.

IMHO, that's not a good idea.
Comment 4 SpanKY gentoo-dev 2007-12-07 06:44:49 UTC
then why dont you extend the desktop creation function
Comment 5 Santiago M. Mola (RETIRED) gentoo-dev 2007-12-10 19:34:45 UTC
make_desktop_entry (or a new function) could take as an argument the shipped .desktop, fix some fields and add the ones which are missing. It could also print an ewarn when it find an invalid category.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2007-12-23 02:46:19 UTC
(In reply to comment #5)
> make_desktop_entry (or a new function) could take as an argument the shipped
> .desktop, fix some fields and add the ones which are missing. It could also
> print an ewarn when it find an invalid category.
> 

We already have domenu.
Comment 7 Santiago M. Mola (RETIRED) gentoo-dev 2007-12-25 14:36:42 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > make_desktop_entry (or a new function) could take as an argument the shipped
> > .desktop, fix some fields and add the ones which are missing. It could also
> > print an ewarn when it find an invalid category.
> > 
> 
> We already have domenu.
> 

Fixing some fields, adding new ones or print warnings is still applicable to domenu.

Comment 8 Zac Medico gentoo-dev 2007-12-30 17:31:01 UTC
This has been released in 2.1.4_rc12.