summaryrefslogtreecommitdiff
path: root/eclass/kde4-functions.eclass
diff options
context:
space:
mode:
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2008-09-23 03:01:49 +0000
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2008-09-23 03:01:49 +0000
commite89d773a079f91031304b298710d4a5e14a92bf3 (patch)
tree53a6c5ebb772cf18de6eac7d17e8c817b89195e9 /eclass/kde4-functions.eclass
parent9cabf7ba581193386161579ccd803a0be1f62fe2 (diff)
downloadkde-e89d773a079f91031304b298710d4a5e14a92bf3.tar.gz
kde-e89d773a079f91031304b298710d4a5e14a92bf3.tar.bz2
kde-e89d773a079f91031304b298710d4a5e14a92bf3.zip
Applied more fixes from the master branch to the eclasses.
Diffstat (limited to 'eclass/kde4-functions.eclass')
-rw-r--r--eclass/kde4-functions.eclass35
1 files changed, 5 insertions, 30 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index bfbce2b74eb..0c4631290e7 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -390,44 +390,19 @@ buildsycoca() {
debug-print-function ${FUNCNAME} "$@"
if [[ -x ${KDEDIR}/bin/kbuildsycoca4 && -z "${ROOT%%/}" ]]; then
- # First of all, make sure that the /usr/share/services directory exists
- # and it has the right permissions
- mkdir -p /usr/share/services
- chown root:0 /usr/share/services
- chmod 0755 /usr/share/services
-
# Make sure tha cache file exists, or kbuildsycoca4 will fail
touch "${KDEDIR}/share/kde4/services/ksycoca4"
- # kbuildsycoca4 needs a running dbus session to work correctly.
- # We have to start a new dbus session, because the DBUS_SESSION_BUS_ADDRESS in the environment
- # could from from the user's environment (through su [without '-']), causing kbuildsycoca4 to hang.
-
- echo "Starting dbus session for kbuildsycoca4"
- local _i
- for _i in $(dbus-launch); do
- # We export both the ADDRESS _and_ the PID. We need the latter only to kill our session.
- debug-print "Exporting: ${_i}"
- export "${_i}";
- done
- debug-print "kbuildsycoca4 is using ${DBUS_SESSION_BUS_ADDRESS}"
+ # We have to unset DISPLAY and DBUS_SESSION_BUS_ADDRESS, the ones
+ # in the user's environment (through su [without '-']) may cause
+ # kbuildsycoca4 to hang.
ebegin "Running kbuildsycoca4 to build global database"
# This is needed because we support multiple kde versions installed together.
XDG_DATA_DIRS="/usr/share:${KDEDIRS//:/\/share:}/share:/usr/local/share" \
- DISPLAY="" ${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null
+ DISPLAY="" DBUS_SESSION_BUS_ADDRESS="" \
+ ${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null
eend $?
-
- echo "Killing dbus session for kbuildsycoca4"
- debug-print "ADDRESS ${DBUS_SESSION_BUS_ADDRESS}"
- debug-print "PID: ${DBUS_SESSION_BUS_PID}"
- kill ${DBUS_SESSION_BUS_PID}
- eend $?
- unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
-
- # For some reason this directory gets created with noone other than root
- # being able to read it. Hence we chmod it.
- chmod -R 0755 "${ROOT}"/usr/share/kde4
fi
}