diff options
author | 2024-01-08 14:27:31 +0000 | |
---|---|---|
committer | 2024-01-08 14:27:31 +0000 | |
commit | 40d924aafe602583a23aa3212528ca3d528c5b2c (patch) | |
tree | 491431fdf07da00d00d408e980f60bf50d0f127f | |
parent | wrapper/etc/portage/make.conf: Remove -pam (diff) | |
download | crossdev-40d924aafe602583a23aa3212528ca3d528c5b2c.tar.gz crossdev-40d924aafe602583a23aa3212528ca3d528c5b2c.tar.bz2 crossdev-40d924aafe602583a23aa3212528ca3d528c5b2c.zip |
cross-{ebuild,emerge}: improve error message for missing SYSROOT
This can happen if you rm -rf the SYSROOT (rather than crossdev -C).
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | wrappers/cross-ebuild | 7 | ||||
-rwxr-xr-x | wrappers/cross-emerge | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/wrappers/cross-ebuild b/wrappers/cross-ebuild index 6f47cb8..a520e18 100644 --- a/wrappers/cross-ebuild +++ b/wrappers/cross-ebuild @@ -19,11 +19,16 @@ fi : ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}} export EPREFIX SYSROOT PORTAGE_CONFIGROOT -if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then +if [ -z "${CHOST}" ] ; then echo "cross-ebuild: CHOST is not set properly" exit 1 fi +if [ ! -d "${SYSROOT}" ] ; then + echo "cross-ebuild: ${SYSROOT} does not exist (is CHOST set properly?)" + exit 1 +fi + # Portage defaults CBUILD to CHOST, so we have to remove CHOST # from the env to get a "good" value for CBUILD query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS" diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge index a85d41e..eb2d5b5 100755 --- a/wrappers/cross-emerge +++ b/wrappers/cross-emerge @@ -19,11 +19,16 @@ fi : ${PORTAGE_CONFIGROOT=${SYSROOT}${EPREFIX}} export EPREFIX SYSROOT PORTAGE_CONFIGROOT -if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then +if [ -z "${CHOST}" ] ; then echo "cross-emerge: CHOST is not set properly" exit 1 fi +if [ ! -d "${SYSROOT}" ] ; then + echo "cross-emerge: ${SYSROOT} does not exist (is CHOST set properly?)" + exit 1 +fi + # Portage defaults CBUILD to CHOST, so we have to remove CHOST # from the env to get a "good" value for CBUILD query_vars="CBUILD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS" |