/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.276 Revision 1.277
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.276 2007/02/18 03:11:46 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.277 2007/04/06 11:43:30 carlo Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
916 # doesn't corrupt the env of the caller 916 # doesn't corrupt the env of the caller
917 insinto /usr/share/applications 917 insinto /usr/share/applications
918 doins "${desktop}" 918 doins "${desktop}"
919 ) 919 )
920} 920}
921
922
923# Validatedesktop entries using desktop-file-utils
924# Carsten Lohrke <carlo@gentoo.org>
925#
926# Usage: validate_desktop_entries [directory ...]
927
928validate_desktop_entries() {
929 if [[ -x /usr/bin/desktop-file-validate ]] ; then
930 einfo "Checking desktop entry validity"
931 local directories=""
932 for d in $@ ; do
933 directories="${directories} ${D}${d}"
934 done
935 for FILE in $(find ${D}/usr/share/applications ${directories} -name "*\.desktop" \
936 -not -path '*.hidden*' 2>/dev/null)
937 do
938 local temp=$(desktop-file-validate ${FILE} | grep -v "warning:")
939 [[ -n $temp ]] && elog ${temp//${D}/}
940 done
941 echo ""
942 else
943 einfo "Passing desktop entry validity check. Install dev-util/desktop-file-utils, if you want to help to improve Gentoo."
944 fi
945}
946
921 947
922# Make a GDM/KDM Session file 948# Make a GDM/KDM Session file
923# 949#
924# make_session_desktop(<title>, <command>) 950# make_session_desktop(<title>, <command>)
925# title: File to execute to start the Window Manager 951# title: File to execute to start the Window Manager

Legend:
Removed from v.1.276  
changed lines
  Added in v.1.277

  ViewVC Help
Powered by ViewVC 1.1.20