Misc prefix fixes
authorFabian Groffen <grobian@gentoo.org>
Sun, 22 Oct 2006 14:31:25 +0000 (14:31 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 22 Oct 2006 14:31:25 +0000 (14:31 -0000)
svn path=/main/branches/prefix/; revision=4796

bin/misc-functions.sh
pym/portage.py

index b8120cce67b1ad9644e03ad94c4e5aaba241f788..5f10af533f3155ead01baeb7ad129062d3732150 100644 (file)
@@ -293,6 +293,8 @@ preinst_sfperms() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
+       else
+               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # Smart FileSystem Permissions
        if hasq sfperms $FEATURES; then
@@ -313,6 +315,8 @@ preinst_suid_scan() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
+       else
+               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # total suid control.
        if hasq suidctl $FEATURES; then
@@ -352,12 +356,14 @@ preinst_selinux_labels() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
+       else
+               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        if hasq selinux ${FEATURES}; then
                # SELinux file labeling (needs to always be last in dyn_preinst)
                # only attempt to label if setfiles is executable
                # and 'context' is available on selinuxfs.
-               if [ -f /selinux/context -a -x ${EPREFIX}/usr/sbin/setfiles -a -x ${EPREFIX}/usr/sbin/selinuxconfig ]; then
+               if [ -f ${EPREFIX}/selinux/context -a -x ${EPREFIX}/usr/sbin/setfiles -a -x ${EPREFIX}/usr/sbin/selinuxconfig ]; then
                        vecho ">>> Setting SELinux security labels"
                        (
                                eval "$(${EPREFIX}/usr/sbin/selinuxconfig)" || \
index 1b8222ac6a8d82893d2ff53b7a6b9938600ba546..d6b4fbcb9b8cc3bbaec1b40499c89925b2b6e1f7 100644 (file)
@@ -3000,7 +3000,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                                        filemode=060, filemask=0)
                        return retval
                elif mydo == "preinst":
-                       mysettings["IMAGE"] = mysettings["EDEST"]
+                       mysettings["IMAGE"] = mysettings["D"]
                        phase_retval = spawn(" ".join((EBUILD_SH_BINARY, mydo)),
                                mysettings, debug=debug, free=1, logfile=logfile)
                        if phase_retval == os.EX_OK: