From f98127d2569048c5d29d1734f2f7f8ba64c85242 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 Aug 2013 20:01:08 -0700 Subject: [PATCH] validate_desktop_entry: handle NotShowIn Pantheon This will fix bug #480586. --- pym/portage/util/_desktop_entry.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.26.2