Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432862 - Portage .desktop validation needs to ignore more errors
Summary: Portage .desktop validation needs to ignore more errors
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 431026
  Show dependency tree
 
Reported: 2012-08-26 14:34 UTC by Michael Palimaka (kensington)
Modified: 2012-09-22 08:25 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 Michael Palimaka (kensington) gentoo-dev 2012-08-26 14:34:21 UTC
As per the spec, we should also ignore certain errors where entry_type == "ServiceType".

In these cases, there are further errors that should also be ignored:

* error: file contains group "PropertyDef::X-variable_text-variable_text", but groups extending the format should start with "X-"

* error: key "Exec" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"

* error: key "Categories" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"

In all probability there are further "extensions" that should be ignored. KDE upstream says "you shouldn't be running desktop-file-validate anyway, since we have several extensions that don't comply with the main format, and nothing besides KDE should be reading these anyway", so an alternative option is to just skip validating Service and ServiceType .desktop files completely.
Comment 1 Zac Medico gentoo-dev 2012-08-26 19:14:45 UTC
Apparently kde-base/kdelibs and kde-base/kcontrol also install another type of desktop file in /usr/share/apps/kcm_componentchooser that we need to ignore. We can use the configurationType key to identify them, since none of the other desktop file appear to use this key.
Comment 2 Zac Medico gentoo-dev 2012-08-26 19:37:54 UTC
Looking through my logs from my kde-4.9 update, there are also several other kinds that need to be ignored. Here's an incomplete list:

kde-base/kdebase-data installs desktop files in /usr/share/locale/currency with single "[Currency Code]" section

kde-base/kdepim-runtime installs desktop files in sub-directories of /usr/share/akonadi and /usr/share/apps/akonadi:

  /usr/share/akonadi/agents: Type=AkonadiAgent
  /usr/share/apps/akonadi/accountwizard: [Wizard]
  /usr/share/apps/akonadi/plugins: [Plugin]
Comment 3 Zac Medico gentoo-dev 2012-08-26 21:48:08 UTC
Hopefully this filters most of the noise:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8c8dcc663f90f36a81437a711b086ec3bc5d3eef
Comment 4 Zac Medico gentoo-dev 2012-08-26 23:14:17 UTC
This is fixed in 2.1.11.12 and 2.2.0_alpha123.
Comment 6 Zac Medico gentoo-dev 2012-09-12 08:04:00 UTC
New approach in 2.1.11.15 and 2.2.0_alpha126:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9f735963c000f0e925b513c5378b2552476c0e8e
Comment 7 Zac Medico gentoo-dev 2012-09-22 08:25:45 UTC
QA_DESKTOP_FILE variable in 2.1.11.19 and 2.2.0_alpha130:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8ba939d53e52a88c183a2db95d1e51f04b0d9bb6