Summary: | make repoman run desktop-file-validate on .desktop files | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Petteri Räty (RETIRED) <betelgeuse> |
Component: | Repoman | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | coldwind, ulm |
Priority: | High | Keywords: | InVCS |
Version: | 2.2 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 200044 |
Description
Petteri Räty (RETIRED)
![]() 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. |