Move XARGS initialization from portage.data to isolated-functions.sh.
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 11:30:30 +0000 (11:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 11:30:30 +0000 (11:30 -0000)
svn path=/main/trunk/; revision=9096

bin/isolated-functions.sh
pym/portage/data.py

index e06fbb826e8cf47f835c59fdfe1b0dab7cb851e8..3290654a6723125e6a488d2e041377d7aedf3878 100755 (executable)
@@ -375,6 +375,17 @@ case "${NOCOLOR:-false}" in
                ;;
 esac
 
+if [[ -z ${XARGS} ]] ; then
+       case ${USERLAND} in
+       BSD|Darwin)
+               export XARGS="xargs"
+               ;;
+       *)
+               export XARGS="xargs -r"
+               ;;
+       esac
+fi
+
 has() {
        hasq "$@"
 }
index dc72d6fa23fcd7cd2935462980d1b1ab3a60a87e..d50a6752a7a6c7555bf83b277c1bfb05a198464c 100644 (file)
@@ -18,15 +18,12 @@ if ostype == "Linux" or \
        ostype.lower().startswith("gnu") or \
        ostype.lower().endswith("gnu"):
        userland="GNU"
-       os.environ["XARGS"]="xargs -r"
 elif ostype == "Darwin":
        userland="Darwin"
-       os.environ["XARGS"]="xargs"
        def lchown(*pos_args, **key_args):
                pass
 elif ostype.endswith("BSD") or ostype =="DragonFly":
        userland="BSD"
-       os.environ["XARGS"]="xargs"
 
 if not lchown:
        if "lchown" in dir(os):