You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-ch...

26 lines
991 B

diff -ru baselayout-1.12.5.orig/etc/profile baselayout-1.12.5/etc/profile
--- baselayout-1.12.5.orig/etc/profile 2009-11-27 15:27:58 +0100
+++ baselayout-1.12.5/etc/profile 2009-11-27 15:34:14 +0100
@@ -137,6 +137,21 @@
done
fi
+#
+# final finally set EPREFIX to our prefix if we don't have a local portage. this
+# was previously done by the startprefix script, but we want to be able to start
+# this environment by simply sourcing etc/profile with the correct shell.
+#
+if [[ -z "${EPREFIX}" ]]; then
+ if [[ ! -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/emerge ]]; then
+ export EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+ fi
+elif [[ "${EPREFIX}" != "@GENTOO_PORTAGE_EPREFIX@" ]]; then
+ echo "WARNING: EPREFIX is set from environment to \"${EPREFIX}\"."
+ echo " You are entering the prefix \"@GENTOO_PORTAGE_EPREFIX@\"."
+ echo " Having EPREFIX set this way will probably render this environment unusable."
+fi
+
unset _ro_root
unset _ro_deps
unset _ro_chained_path_vars