aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers')
-rwxr-xr-xwrappers/cross-emerge15
1 files changed, 8 insertions, 7 deletions
diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge
index 7b63756..a85d41e 100755
--- a/wrappers/cross-emerge
+++ b/wrappers/cross-emerge
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
if [ -z "${CHOST}" ] ; then
@@ -9,14 +9,15 @@ if [ -z "${CHOST}" ] ; then
fi
export CHOST
-EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
-if [ "${EPREFIX}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
- EPREFIX=""
+BROOT="@GENTOO_PORTAGE_EPREFIX@"
+if [ "${BROOT}" = "@"GENTOO_PORTAGE_EPREFIX"@" ] ; then
+ BROOT=""
fi
-: ${SYSROOT=${EPREFIX}/usr/${CHOST}}
-: ${PORTAGE_CONFIGROOT=${SYSROOT}}
-export SYSROOT PORTAGE_CONFIGROOT
+: ${EPREFIX=}
+: ${SYSROOT=${BROOT}/usr/${CHOST}}
+: ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}}
+export EPREFIX SYSROOT PORTAGE_CONFIGROOT
if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then
echo "cross-emerge: CHOST is not set properly"