diff options
author | Carsten Lohrke <carlo@gentoo.org> | 2007-04-25 09:14:35 +0000 |
---|---|---|
committer | Carsten Lohrke <carlo@gentoo.org> | 2007-04-25 09:14:35 +0000 |
commit | 35b6567ea624d8f85c6c70cfc322105e7b5c9bd3 (patch) | |
tree | 48fba774d3d370ff9c9cca2386cb9ac6468c82e1 | |
parent | Version bump thanks to Roman Zimmermann <mereandor@gmail.com> and karpi in bu... (diff) | |
download | gentoo-2-35b6567ea624d8f85c6c70cfc322105e7b5c9bd3.tar.gz gentoo-2-35b6567ea624d8f85c6c70cfc322105e7b5c9bd3.tar.bz2 gentoo-2-35b6567ea624d8f85c6c70cfc322105e7b5c9bd3.zip |
validate_desktop_entries: Donn't search in non-existing directories.
-rw-r--r-- | eclass/eutils.eclass | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 7a7e98ca9831..25e5ce6a8d1d 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.278 2007/04/22 15:55:07 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.279 2007/04/25 09:14:35 carlo Exp $ # # This eclass is for general purpose functions that most ebuilds # have to implement themselves. @@ -929,16 +929,18 @@ validate_desktop_entries() { if [[ -x /usr/bin/desktop-file-validate ]] ; then einfo "Checking desktop entry validity" local directories="" - for d in $@ ; do - directories="${directories} ${D}${d}" - done - for FILE in $(find ${D}/usr/share/applications ${directories} -name "*\.desktop" \ - -not -path '*.hidden*' | sort -u 2>/dev/null) - do - local temp=$(desktop-file-validate ${FILE} | grep -v "warning:" | \ - sed -e "s|error: ||" -e "s|${FILE}:|--|g" ) - [[ -n $temp ]] && elog ${temp/--/${FILE/${D}/}:} + for d in /usr/share/applications $@ ; do + [[ -d ${D}${d} ]] && directories="${directories} ${D}${d}" done + if [[ -n ${directories} ]] ; then + for FILE in $(find ${directories} -name "*\.desktop" \ + -not -path '*.hidden*' | sort -u 2>/dev/null) + do + local temp=$(desktop-file-validate ${FILE} | grep -v "warning:" | \ + sed -e "s|error: ||" -e "s|${FILE}:|--|g" ) + [[ -n $temp ]] && elog ${temp/--/${FILE/${D}/}:} + done + fi echo "" else einfo "Passing desktop entry validity check. Install dev-util/desktop-file-utils, if you want to help to improve Gentoo." |