| 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.3 2007/01/24 18:20:01 compnerd Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.4 2007/04/24 18:13:14 dang 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 |
| … | |
… | |
| 92 | debug-print "${updater} is not executable" |
92 | debug-print "${updater} is not executable" |
| 93 | |
93 | |
| 94 | return |
94 | return |
| 95 | fi |
95 | fi |
| 96 | |
96 | |
| 97 | if ! grep -q "obj /usr/share/icons" ${ROOT}var/db/pkg/*/${PF}/CONTENTS |
|
|
| 98 | then |
|
|
| 99 | debug-print "No items to update" |
|
|
| 100 | |
|
|
| 101 | return |
|
|
| 102 | fi |
|
|
| 103 | |
|
|
| 104 | ebegin "Updating icons cache" |
97 | ebegin "Updating icons cache" |
| 105 | |
98 | |
| 106 | local retval=0 |
99 | local retval=0 |
| 107 | local fails=( ) |
100 | local fails=( ) |
| 108 | |
101 | |
| 109 | for dir in $(find ${ROOT}/usr/share/icons -maxdepth 1 -mindepth 1 -type d) |
102 | for dir in $(find ${ROOT}/usr/share/icons -maxdepth 1 -mindepth 1 -type d) |
| 110 | do |
103 | do |
| 111 | if [[ -f "${dir}/index.theme" ]] ; then |
104 | if [[ -f "${dir}/index.theme" ]] ; then |
| 112 | local rv=0 |
105 | local rv=0 |
| 113 | |
106 | |
| 114 | ${updater} -qf ${dir} |
107 | ${updater} -q ${dir} |
| 115 | rv=$? |
108 | rv=$? |
| 116 | |
109 | |
| 117 | if [[ ! $rv -eq 0 ]] ; then |
110 | if [[ ! $rv -eq 0 ]] ; then |
| 118 | debug-print "Updating cache failed on ${dir}" |
111 | debug-print "Updating cache failed on ${dir}" |
| 119 | |
112 | |