| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 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.45 2011/04/06 14:22:14 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.46 2011/04/21 22:32:33 dilfridge Exp $ |
| 4 | |
4 | |
| 5 | inherit versionator |
5 | inherit versionator |
| 6 | |
6 | |
| 7 | # @ECLASS: kde4-functions.eclass |
7 | # @ECLASS: kde4-functions.eclass |
| 8 | # @MAINTAINER: |
8 | # @MAINTAINER: |
| … | |
… | |
| 129 | # fix permission for some directories |
129 | # fix permission for some directories |
| 130 | for x in share/{config,kde4}; do |
130 | for x in share/{config,kde4}; do |
| 131 | [[ ${KDEDIR} == /usr ]] && DIRS=${EROOT}usr || DIRS="${EROOT}usr ${EROOT}${KDEDIR}" |
131 | [[ ${KDEDIR} == /usr ]] && DIRS=${EROOT}usr || DIRS="${EROOT}usr ${EROOT}${KDEDIR}" |
| 132 | for y in ${DIRS}; do |
132 | for y in ${DIRS}; do |
| 133 | [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist |
133 | [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist |
|
|
134 | # fixes Bug 318237 |
|
|
135 | if use userland_BSD ; then |
|
|
136 | [[ $(stat -f %p "${y}/${x}") != 40755 ]] |
|
|
137 | local stat_rtn="$?" |
|
|
138 | else |
| 134 | if [[ $(stat --format=%a "${y}/${x}") != 755 ]]; then |
139 | [[ $(stat --format=%a "${y}/${x}") != 755 ]] |
|
|
140 | local stat_rtn=$? |
|
|
141 | fi |
|
|
142 | if [[ $stat_rtn != 1 ]] ; then |
| 135 | ewarn "QA Notice:" |
143 | ewarn "QA Notice:" |
| 136 | ewarn "Package ${PN} is breaking ${y}/${x} permissions." |
144 | ewarn "Package ${PN} is breaking ${y}/${x} permissions." |
| 137 | ewarn "Please report this issue to gentoo bugzilla." |
145 | ewarn "Please report this issue to gentoo bugzilla." |
| 138 | einfo "Permissions will get adjusted automatically now." |
146 | einfo "Permissions will get adjusted automatically now." |
| 139 | find "${y}/${x}" -type d -print0 | xargs -0 chmod 755 |
147 | find "${y}/${x}" -type d -print0 | xargs -0 chmod 755 |