From: Zac Medico Date: Mon, 12 Aug 2013 03:01:08 +0000 (-0700) Subject: validate_desktop_entry: handle NotShowIn Pantheon X-Git-Tag: v2.2.0~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f98127d2569048c5d29d1734f2f7f8ba64c85242;p=portage.git validate_desktop_entry: handle NotShowIn Pantheon This will fix bug #480586. --- diff --git a/pym/portage/util/_desktop_entry.py b/pym/portage/util/_desktop_entry.py index a46d5828d..29e154d15 100644 --- a/pym/portage/util/_desktop_entry.py +++ b/pym/portage/util/_desktop_entry.py @@ -51,6 +51,11 @@ _ignored_errors = ( 'warning: key "Encoding" in group "Desktop Entry" is deprecated' ) +_NotShowIn_exemptions = ( + # See bug #480586. + 'contains an unregistered value "Pantheon"', +) + def validate_desktop_entry(path): args = ["desktop-file-validate", path] @@ -75,6 +80,14 @@ 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: + exempt = False + for s in _NotShowIn_exemptions: + if s in msg: + exempt = True + break + if exempt: + continue filtered_output.append(line) output_lines = filtered_output