summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-04-19 10:23:07 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-04-19 10:23:07 +0000
commite946fef40b8d2fceaa20632426b71023deea8a9a (patch)
treea5977e3e2d32878341981bdf053abc6c9a0ed8b6 /eclass
parentVersion bump dev-haskell/network (diff)
downloadhistorical-e946fef40b8d2fceaa20632426b71023deea8a9a.tar.gz
historical-e946fef40b8d2fceaa20632426b71023deea8a9a.tar.bz2
historical-e946fef40b8d2fceaa20632426b71023deea8a9a.zip
Update permission fixing code. Per bug #266432.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde4-functions.eclass21
1 files changed, 12 insertions, 9 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index c973cfd76e5c..2fd7ca94d4f0 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.16 2009/04/17 10:41:29 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.17 2009/04/19 10:23:07 scarabeus Exp $
# @ECLASS: kde4-functions.eclass
# @MAINTAINER:
@@ -76,14 +76,17 @@ buildsycoca() {
# fix permission for some directories
for x in share/config share/kde4; do
- if [[ $(stat --format=%a /usr/${x}) != 755 || $(stat --format=%a ${KDEDIR}/${x}) != 755 ]]; then
- ewarn "QA Notice:"
- ewarn "Package ${PN} is breaking ${KDEDIR}/${x} permissions."
- ewarn "Please report this issue to gentoo bugzilla."
- einfo "Permissions will get adjusted automatically now."
- find /usr/${x} -type d -print0 | xargs -0 chmod 755
- [[ ${KDEDIR} = /usr ]] || find ${KDEDIR}/${x} -type d -print0 | xargs -0 chmod 755
- fi
+ [[ ${KDEDIR} = /usr ]] && DIRS=/usr || DIRS="/usr ${KDEDIR}"
+ for y in ${DIRS}; do
+ [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist
+ if [[ $(stat --format=%a "${y}/${x}") != 755 ]]; then
+ ewarn "QA Notice:"
+ ewarn "Package ${PN} is breaking ${y}/${x} permissions."
+ ewarn "Please report this issue to gentoo bugzilla."
+ einfo "Permissions will get adjusted automatically now."
+ find "${y}/${x}" -type d -print0 | xargs -0 chmod 755
+ fi
+ done
done
}