Bug 201498 - make repoman run desktop-file-validate on .desktop files
|
Bug#:
201498
|
Product: Portage Development
|
Version: 2.2
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: dev-portage@gentoo.org
|
Reported By: betelgeuse@gentoo.org
|
|
Component: Repoman
|
|
|
URL:
http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop
|
|
Summary: make repoman run desktop-file-validate on .desktop files
|
|
Keywords: InSVN
|
|
Status Whiteboard:
|
|
Opened: 2007-12-06 17:51 0000
|
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.
(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.
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.
then why dont you extend the desktop creation function
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.
(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.
(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.
This has been released in 2.1.4_rc12.