/always/ have a GNU userland. I could reliably make this the case in
portage/data.py. In isolated-functions.sh I couldn't. It looks strange
to me it's being set there as well.
I personally hope that USERLAND can go away some day. Prefix could
cater for this in the current FreeBSD case, by simply having an
alternative EPREFIX for a number of packages that Portage needs (bash,
coreutils, findutils, sed, gawk ...).
svn path=/main/branches/prefix/; revision=9125
;;
esac
-if [[ -z ${USERLAND} ]] ; then
- case $(uname -s) in
- *BSD|DragonFly)
- export USERLAND="BSD"
- ;;
- *)
- export USERLAND="GNU"
- ;;
- esac
-fi
+# In Prefix every platform has USERLAND=GNU, even FreeBSD. Since I
+# don't know how to reliably "figure out" we are in a Prefix instance of
+# portage here, I for now disable this check, and hardcode it to GNU.
+# Somehow it appears stange to me that this code is in this file,
+# non-ebuilds/eclasses should never rely on USERLAND and XARGS, don't they?
+#if [[ -z ${USERLAND} ]] ; then
+# case $(uname -s) in
+# *BSD|DragonFly)
+# export USERLAND="BSD"
+# ;;
+# *)
+# export USERLAND="GNU"
+# ;;
+# esac
+#fi
+[[ -z ${USERLAND} ]] && USERLAND="GNU"
if [[ -z ${XARGS} ]] ; then
case ${USERLAND} in
ostype=os.uname()[0]
userland = None
-if ostype == "DragonFly" or ostype.endswith("BSD"):
+# Prefix always has USERLAND=GNU, even on
+# FreeBSD, OpenBSD and Darwin (thank the lord!).
+# Hopefully this entire USERLAND hack can go once
+if portage.const.EPREFIX == "" and
+ (ostype == "DragonFly" or ostype.endswith("BSD")):
userland = "BSD"
else:
userland = "GNU"