From 04fad91fac249896b4c3b257ac36cbf1bf9cd924 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 8 Jan 2008 17:09:54 +0000 Subject: [PATCH] Merged from trunk 9154:9158 | 9155 | Bug #204753 - Add "distfiles" and "packages" to the list of | | zmedico | non-category directories. | | 9157 | When spawing the "depend" phase, use file descriptors from | | zmedico | sys.std* streams. | | 9158 | After loading the environment, make sure the color variables | | zmedico | are in sync with the current NOCOLOR setting. | svn path=/main/branches/prefix/; revision=9159 --- bin/ebuild.sh | 12 ++++++++++++ pym/portage/__init__.py | 6 +++++- pym/portage/dbapi/porttree.py | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index f6928fccd..6c748bded 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1651,6 +1651,18 @@ if ! hasq ${EBUILD_PHASE} clean depend && \ unset x y export SANDBOX_ON=${PORTAGE_SANDBOX_ON} unset PORTAGE_SANDBOX_ON + + # After loading the environment, make sure the color variables + # are in sync with the current NOCOLOR setting. + case "${NOCOLOR:-false}" in + yes|true) + unset_colors + ;; + no|false) + set_colors + ;; + esac + source_all_bashrcs fi diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 4515b2d9e..e22e8074c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4445,7 +4445,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, if isinstance(dbkey, dict): mysettings["dbkey"] = "" pr, pw = os.pipe() - fd_pipes = {0:0, 1:1, 2:2, 9:pw} + fd_pipes = { + 0:sys.stdin.fileno(), + 1:sys.stdout.fileno(), + 2:sys.stderr.fileno(), + 9:pw} mypids = spawn(_shell_quote(ebuild_sh_binary) + " depend", mysettings, fd_pipes=fd_pipes, returnpid=True, droppriv=droppriv) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 61ce3c47b..813d9229d 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -27,8 +27,8 @@ from itertools import izip class portdbapi(dbapi): """this tree will scan a portage directory located at root (passed to init)""" portdbapi_instances = [] - _non_category_dirs = ["eclass", "licenses", - "metadata", "profiles", "scripts"] + _non_category_dirs = ["distfiles", "eclass", "licenses", + "metadata", "packages", "profiles", "scripts"] _non_category_dirs = re.compile(r'^(%s)$' % "|".join(_non_category_dirs)) def __init__(self, porttree_root, mysettings=None): portdbapi.portdbapi_instances.append(self) -- 2.26.2