From: Fabian Groffen Date: Fri, 2 Dec 2011 18:02:26 +0000 (+0100) Subject: Merge commit 'v2.2.0_alpha72' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f5b5a26b7d729a93b784de29e438ad76b3e7c433;p=portage.git Merge commit 'v2.2.0_alpha72' into prefix Conflicts: bin/lock-helper.py bin/xpak-helper.py pym/_emerge/actions.py pym/portage/__init__.py --- f5b5a26b7d729a93b784de29e438ad76b3e7c433 diff --cc bin/lock-helper.py index 886b52d47,065ddcbc4..23db09652 --- a/bin/lock-helper.py +++ b/bin/lock-helper.py @@@ -1,5 -1,5 +1,5 @@@ -#!/usr/bin/python +#!@PREFIX_PORTAGE_PYTHON@ - # Copyright 2010 Gentoo Foundation + # Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import os diff --cc bin/xpak-helper.py index 4d096cc6b,ef74920db..1d57069b8 --- a/bin/xpak-helper.py +++ b/bin/xpak-helper.py @@@ -1,5 -1,5 +1,5 @@@ -#!/usr/bin/python +#!@PREFIX_PORTAGE_PYTHON@ - # Copyright 2009 Gentoo Foundation + # Copyright 2009-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import optparse diff --cc pym/_emerge/actions.py index 46d68b834,af3780e70..7e032d1b3 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@@ -25,7 -30,7 +30,7 @@@ from portage import o from portage import subprocess_getstatusoutput from portage import _unicode_decode from portage.cache.cache_errors import CacheError - from portage.const import GLOBAL_CONFIG_PATH, NEWS_LIB_PATH, EPREFIX -from portage.const import GLOBAL_CONFIG_PATH ++from portage.const import GLOBAL_CONFIG_PATH, EPREFIX from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_SET_CONFIG from portage.dbapi.dep_expand import dep_expand from portage.dbapi._expand_new_virt import expand_new_virt diff --cc pym/portage/__init__.py index 3de273f4b,27353a1e8..c5b7f7682 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@@ -491,15 -495,25 +496,27 @@@ def create_trees(config_root=None, targ portdbapi.portdbapi_instances.remove(portdb) del trees[myroot]["porttree"], myroot, portdb - eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX") + if trees is None: + trees = _trees_dict() + elif not isinstance(trees, _trees_dict): + # caller passed a normal dict or something, + # but we need a _trees_dict instance + trees = _trees_dict(trees) + + if env is None: + env = os.environ + eprefix = env.get("__PORTAGE_TEST_EPREFIX") + if not eprefix: + eprefix = EPREFIX settings = config(config_root=config_root, target_root=target_root, - config_incrementals=portage.const.INCREMENTALS, _eprefix=eprefix) + env=env, _eprefix=eprefix) settings.lock() - myroots = [(settings["ROOT"], settings)] - if settings["ROOT"] != "/": + trees._target_eroot = settings['EROOT'] + myroots = [(settings['EROOT'], settings)] + if settings["ROOT"] == "/": + trees._running_eroot = trees._target_eroot + else: # When ROOT != "/" we only want overrides from the calling # environment to apply to the config that's associated diff --cc pym/portage/dbapi/vartree.py index f3334941c,73772b0e0..d189775c9 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@@ -29,11 -29,9 +29,12 @@@ portage.proxy.lazyimport.lazyimport(glo 'portage.util.listdir:dircache,listdir', 'portage.util._dyn_libs.PreservedLibsRegistry:PreservedLibsRegistry', 'portage.util._dyn_libs.LinkageMapELF:LinkageMapELF@LinkageMap', + 'portage.util._dyn_libs.LinkageMapMachO:LinkageMapMachO', + 'portage.util._dyn_libs.LinkageMapPeCoff:LinkageMapPeCoff', + 'portage.util._dyn_libs.LinkageMapXCoff:LinkageMapXCoff', 'portage.versions:best,catpkgsplit,catsplit,cpv_getkey,pkgcmp,' + \ '_pkgsplit@pkgsplit', + 'tarfile', ) from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \ diff --cc pym/portage/package/ebuild/_config/MaskManager.py index 89c06fd76,bce1152ee..7d44e7960 --- a/pym/portage/package/ebuild/_config/MaskManager.py +++ b/pym/portage/package/ebuild/_config/MaskManager.py @@@ -102,22 -116,16 +116,27 @@@ class MaskManager(object) #to allow profiles to override masks from their parent profiles. profile_pkgmasklines = [] profile_pkgunmasklines = [] - for x in profiles: + # PREFIX LOCAL: Prefix has unmasks for stuff in profiles/package.mask + # If we don't consider the repomasks here, those unmasks are + # lost, causing lots of issues (e.g. Portage being masked) + # for minimal/concentrated code change, empty repo_pkgmasklines here + # such that they don't count double + repo_pkgmasklines = [] + repo_pkgunmasklines = [] + all_profiles = [] + for repo in repositories.repos_with_profiles(): + all_profiles.append(os.path.join(repo.location, "profiles")) + all_profiles.extend(profiles) + for x in all_profiles: profile_pkgmasklines.append(grabfile_package( - os.path.join(x, "package.mask"), recursive=1, remember_source_file=True, verify_eapi=True)) - profile_pkgunmasklines.append(grabfile_package( - os.path.join(x, "package.unmask"), recursive=1, remember_source_file=True, verify_eapi=True)) + os.path.join(x.location, "package.mask"), + recursive=x.portage1_directories, + remember_source_file=True, verify_eapi=True)) + if x.portage1_directories: + profile_pkgunmasklines.append(grabfile_package( + os.path.join(x.location, "package.unmask"), + recursive=x.portage1_directories, + remember_source_file=True, verify_eapi=True)) profile_pkgmasklines = stack_lists(profile_pkgmasklines, incremental=1, \ remember_source_file=True, warn_for_unmatched_removal=True, strict_warn_for_unmatched_removal=strict_umatched_removal) diff --cc runtests.sh index b8be75c83,b7313b79b..d2299f6ae --- a/runtests.sh +++ b/runtests.sh @@@ -27,11 -27,31 +27,31 @@@ interrupted() trap interrupted SIGINT + unused_args=() + + while [[ -n $1 ]] ; do + case "$1" in + --python-versions=*) + PYTHON_VERSIONS=${1#--python-versions=} + ;; + --python-versions) + shift + PYTHON_VERSIONS=$1 + ;; + *) + unused_args[${#unused_args[@]}]=$1 + ;; + esac + shift + done + + set -- "${unused_args[@]}" + exit_status="0" for version in ${PYTHON_VERSIONS}; do - if [[ -x /usr/bin/python${version} ]]; then + if [[ -x @PREFIX_PORTAGE_PYTHON@${version} ]]; then echo -e "${GOOD}Testing with Python ${version}...${NORMAL}" - if ! /usr/bin/python${version} -Wd pym/portage/tests/runTests "$@" ; then + if ! @PREFIX_PORTAGE_PYTHON@${version} -Wd pym/portage/tests/runTests "$@" ; then echo -e "${BAD}Testing with Python ${version} failed${NORMAL}" exit_status="1" fi