Move XARGS initialization from portage.data to isolated-functions.sh.
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 11:38:48 +0000 (11:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 11:38:48 +0000 (11:38 -0000)
(trunk r9095:9097)

svn path=/main/branches/2.1.2/; revision=9098

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

index e06fbb826e8cf47f835c59fdfe1b0dab7cb851e8..3290654a6723125e6a488d2e041377d7aedf3878 100644 (file)
@@ -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 4524c049b1245b9ed3867932f88a0965e5e360dc..7b7a5beadb5383899218e345ed914bcdaa35da46 100644 (file)
@@ -4508,7 +4508,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        if env_stat:
                                mysettings._filter_calling_env = True
                        else:
-                               for var in "ARCH", "USERLAND", "XARGS":
+                               for var in "ARCH", "USERLAND":
                                        value = mysettings.get(var)
                                        if value and value.strip():
                                                continue
index 5cb88b385861d074302bb45185c6693083a7032d..3421d9b9d7eaf1700534d18a3efaf7c7dd74cbfb 100644 (file)
@@ -20,15 +20,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):