/[gentoo-x86]/eclass/gnome2-utils.eclass
Gentoo

Diff of /eclass/gnome2-utils.eclass

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

Revision 1.9 Revision 1.10
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/gnome2-utils.eclass,v 1.9 2008/03/22 10:19:05 remi Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.10 2008/03/22 17:30:11 remi Exp $
4 4
5# 5#
6# gnome2-utils.eclass 6# gnome2-utils.eclass
7# 7#
8# Set of auxiliary functions used to perform actions commonly needed by packages 8# Set of auxiliary functions used to perform actions commonly needed by packages
30 30
31# Find the GConf schemas that are about to be installed and save their location 31# Find the GConf schemas that are about to be installed and save their location
32# in the GNOME2_ECLASS_SCHEMAS environment variable 32# in the GNOME2_ECLASS_SCHEMAS environment variable
33gnome2_gconf_savelist() { 33gnome2_gconf_savelist() {
34 pushd "${D}" &> /dev/null 34 pushd "${D}" &> /dev/null
35 export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas') 35 export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
36 popd &> /dev/null 36 popd &> /dev/null
37} 37}
38 38
39 39
40# Applies any schema files installed by the current ebuild to Gconf's database 40# Applies any schema files installed by the current ebuild to Gconf's database
113# Find the icons that are about to be installed and save their location 113# Find the icons that are about to be installed and save their location
114# in the GNOME2_ECLASS_ICONS environment variable 114# in the GNOME2_ECLASS_ICONS environment variable
115# That function should be called from pkg_preinst 115# That function should be called from pkg_preinst
116gnome2_icon_savelist() { 116gnome2_icon_savelist() {
117 pushd "${D}" &> /dev/null 117 pushd "${D}" &> /dev/null
118 export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d) 118 export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
119 popd &> /dev/null 119 popd &> /dev/null
120} 120}
121 121
122 122
123# Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild 123# Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild
204 fi 204 fi
205 done 205 done
206 206
207 eend $retval 207 eend $retval
208 208
209 for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do 209 for f in "${fails[@]}" ; do
210 ### HACK!! This is needed until bash 3.1 is unmasked.
211 ## The current stable version of bash lists the sizeof fails to be 1
212 ## when there are no elements in the list because it is declared local.
213 ## In order to prevent the declaration from being in global scope, we
214 ## this hack to prevent an empty error message being printed for stable
215 ## users. -- compnerd && allanonjl
216 if [[ "${fails[i]}" != "" && "${fails[i]}" != "()" ]] ; then
217 eerror "Failed to update OMF Makefile ${fails[i]}" 210 eerror "Failed to update OMF Makefile $f"
218 fi
219 done 211 done
220} 212}
221 213
222 214
223# Updates the global scrollkeeper database. 215# Updates the global scrollkeeper database.

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20