Merge commit 'v2.2.0_alpha72' into prefix
authorFabian Groffen <grobian@gentoo.org>
Fri, 2 Dec 2011 18:02:26 +0000 (19:02 +0100)
committerFabian Groffen <grobian@gentoo.org>
Fri, 2 Dec 2011 18:02:26 +0000 (19:02 +0100)
Conflicts:
bin/lock-helper.py
bin/xpak-helper.py
pym/_emerge/actions.py
pym/portage/__init__.py

25 files changed:
1  2 
bin/ebuild
bin/egencache
bin/emaint
bin/glsa-check
bin/lock-helper.py
bin/portageq
bin/quickpkg
bin/regenworld
bin/repoman
bin/xpak-helper.py
man/emerge.1
man/make.conf.5
pym/_emerge/Package.py
pym/_emerge/actions.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/__init__.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/_config/MaskManager.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/util/__init__.py
pym/portage/util/env_update.py
runtests.sh

diff --cc bin/ebuild
Simple merge
diff --cc bin/egencache
Simple merge
diff --cc bin/emaint
Simple merge
diff --cc bin/glsa-check
Simple merge
index 886b52d473e9fca647a5dd94f81cd8e3c2f83702,065ddcbc42e5c9dc3d5df8b2ce4cd290b5f07955..23db09652d579f09c60c3ae483f730e864150644
@@@ -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/portageq
Simple merge
diff --cc bin/quickpkg
Simple merge
diff --cc bin/regenworld
Simple merge
diff --cc bin/repoman
Simple merge
index 4d096cc6b83b76f29ce4bd4ff25dc5e25070aff5,ef74920dbf77a8c58ce2836ccd054b943267b1ed..1d57069b85cd26dbf67f20240084a5a5ca91a04a
@@@ -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 man/emerge.1
Simple merge
diff --cc man/make.conf.5
Simple merge
Simple merge
index 46d68b83405bf891ebeafe94e3613ec028ead621,af3780e70ef72337cd444f17627dd280f4223d95..7e032d1b30126a1cf1373ca35ed9ba675f06fd4b
@@@ -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
Simple merge
Simple merge
index 3de273f4b9052fc497aaaba9b2a4cfef057eefda,27353a1e8b2d5ba2efd033b33767b00637d8a943..c5b7f76824a75d16da8423e0cfd6d31c989fffd0
@@@ -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
Simple merge
index f3334941c3b04c327b09c322e7c80cd98c5b918b,73772b0e0a64016a7c64c44133c2edc20d12d943..d189775c98ab306ffb8f391235c3bbecb086f576
@@@ -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, \
index 89c06fd76f7dadbd959f76778ccfb9c9369bb5a0,bce1152ee717760edee64e18c4f6a263828bf892..7d44e796011d5936b943800c7a9e52674b4960f7
@@@ -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)
Simple merge
Simple merge
Simple merge
diff --cc runtests.sh
index b8be75c837c278808b2ae36c10d10ab592608dcd,b7313b79b91197b9f77c7951a9f6cbf3f792e3d5..d2299f6aeca4a104bbf1ca13f8c16760989dcd63
@@@ -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