validate_desktop_entry: allow OnlyShowIn Pantheon
authorZac Medico <zmedico@gentoo.org>
Tue, 13 Aug 2013 15:46:28 +0000 (08:46 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 13 Aug 2013 15:46:28 +0000 (08:46 -0700)
This will fix bug #480586.

pym/portage/util/_desktop_entry.py

index 29e154d1556432fd1e7880bd548fbf8a625c6651..efd2136714164a3e53000bb9980a99bc48e24329 100644 (file)
@@ -51,7 +51,7 @@ _ignored_errors = (
                'warning: key "Encoding" in group "Desktop Entry" is deprecated'
 )
 
-_NotShowIn_exemptions = (
+_ShowIn_exemptions = (
        # See bug #480586.
        'contains an unregistered value "Pantheon"',
 )
@@ -80,9 +80,10 @@ def validate_desktop_entry(path):
                        # "hint:" output is new in desktop-file-utils-0.21
                        if msg.startswith('hint: ') or msg in _ignored_errors:
                                continue
-                       if 'for key "NotShowIn" in group "Desktop Entry"' in msg:
+                       if 'for key "NotShowIn" in group "Desktop Entry"' in msg or \
+                               'for key "OnlyShowIn" in group "Desktop Entry"':
                                exempt = False
-                               for s in _NotShowIn_exemptions:
+                               for s in _ShowIn_exemptions:
                                        if s in msg:
                                                exempt = True
                                                break