From 19e828fc178f0e55174ae923f6ba9a357fc86885 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 31 Jul 2012 15:01:43 -0700 Subject: [PATCH] Check for desktop-file-validate binary. --- pym/portage/package/ebuild/doebuild.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index dfdfedcbd..395e0eeec 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1749,6 +1749,8 @@ def _post_src_install_uid_fix(mysettings, out): ed_len = len(mysettings["ED"]) desktopfile_errors = [] unicode_errors = [] + desktop_file_validate = \ + portage.process.find_binary("desktop-file-validate") is not None while True: @@ -1796,7 +1798,8 @@ def _post_src_install_uid_fix(mysettings, out): else: fpath = os.path.join(parent, fname) - if fname.endswith(".desktop") and os.path.isfile(fpath): + if desktop_file_validate and fname.endswith(".desktop") and \ + os.path.isfile(fpath): desktop_validate = validate_desktop_entry(fpath) if desktop_validate: desktopfile_errors.extend(desktop_validate) -- 2.26.2