/[gentoo-x86]/eclass/kde4-functions.eclass
Gentoo

Diff of /eclass/kde4-functions.eclass

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

Revision 1.28 Revision 1.29
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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/kde4-functions.eclass,v 1.28 2009/12/10 17:35:52 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.29 2009/12/14 19:44:15 abcd Exp $
4 4
5inherit versionator 5inherit versionator
6 6
7# @ECLASS: kde4-functions.eclass 7# @ECLASS: kde4-functions.eclass
8# @MAINTAINER: 8# @MAINTAINER:
63# Function to rebuild the KDE System Configuration Cache. 63# Function to rebuild the KDE System Configuration Cache.
64# All KDE ebuilds should run this in pkg_postinst and pkg_postrm. 64# All KDE ebuilds should run this in pkg_postinst and pkg_postrm.
65buildsycoca() { 65buildsycoca() {
66 debug-print-function ${FUNCNAME} "$@" 66 debug-print-function ${FUNCNAME} "$@"
67 67
68 [[ -z ${EROOT} ]] && EROOT=${ROOT}${EPREFIX} 68 if [[ ${EAPI} == 2 ]] && ! use prefix; then
69 EROOT=${ROOT}
70 fi
69 71
70 local KDE3DIR="${EROOT}usr/kde/3.5" 72 local KDE3DIR="${EROOT}usr/kde/3.5"
71 if [[ -z ${EROOT%%/} && -x "${KDE3DIR}"/bin/kbuildsycoca ]]; then 73 if [[ -z ${EROOT%%/} && -x "${KDE3DIR}"/bin/kbuildsycoca ]]; then
72 # Since KDE3 is aware of shortcuts in /usr, rebuild database 74 # Since KDE3 is aware of shortcuts in /usr, rebuild database
73 # for KDE3 as well. 75 # for KDE3 as well.
83 85
84 # We no longer need to run kbuildsycoca4, as kded does that automatically, as needed 86 # We no longer need to run kbuildsycoca4, as kded does that automatically, as needed
85 87
86 # fix permission for some directories 88 # fix permission for some directories
87 for x in share/{config,kde4}; do 89 for x in share/{config,kde4}; do
88 [[ ${KDEDIR} = ${EROOT}usr ]] && DIRS=${EROOT}usr || DIRS="${EROOT}usr ${KDEDIR}" 90 [[ ${KDEDIR} == /usr ]] && DIRS=${EROOT}usr || DIRS="${EROOT}usr ${EROOT}${KDEDIR}"
89 for y in ${DIRS}; do 91 for y in ${DIRS}; do
90 [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist 92 [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist
91 if [[ $(stat --format=%a "${y}/${x}") != 755 ]]; then 93 if [[ $(stat --format=%a "${y}/${x}") != 755 ]]; then
92 ewarn "QA Notice:" 94 ewarn "QA Notice:"
93 ewarn "Package ${PN} is breaking ${y}/${x} permissions." 95 ewarn "Package ${PN} is breaking ${y}/${x} permissions."

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20