Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Mon, 29 Aug 2011 18:56:30 +0000 (20:56 +0200)
committerFabian Groffen <grobian@gentoo.org>
Mon, 29 Aug 2011 18:56:30 +0000 (20:56 +0200)
Conflicts:
bin/dispatch-conf
bin/repoman
pym/portage/__init__.py
pym/portage/tests/runTests
pym/portage/util/env_update.py
runtests.sh

16 files changed:
1  2 
bin/dispatch-conf
bin/ebuild.sh
bin/egencache
bin/repoman
man/emerge.1
pym/_emerge/actions.py
pym/_emerge/depgraph.py
pym/portage/__init__.py
pym/portage/data.py
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/doebuild.py
pym/portage/package/ebuild/prepare_build_dirs.py
pym/portage/util/_dyn_libs/LinkageMapELF.py
pym/portage/util/_pty.py
pym/portage/util/env_update.py
runtests.sh

index 6ce255ed56ea6f4e8ed4ccd431eabde966a65f21,497927df42c7f1ab05827b4423474b94b49c7985..fe85c54d6e69e6e5c0b27f21485c119ae21952c0
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2006 Gentoo Foundation
+ # Copyright 1999-2011 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  #
diff --cc bin/ebuild.sh
Simple merge
diff --cc bin/egencache
Simple merge
diff --cc bin/repoman
index d58c52faf570fcc1815879d9a55aec7862e0905a,d9ecfc4693d51e581e97b2a1163ef29904ed31e2..ed62fa112109d4b708e0c03019a6f68be6ade4fd
@@@ -99,7 -96,8 +99,10 @@@ os.umask(0o22
  # behave incrementally.
  repoman_incrementals = tuple(x for x in \
        portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS')
- repoman_settings = portage.config(local_config=False, _eprefix=EPREFIX)
+ eprefix = os.environ.get("__REPOMAN_TEST_EPREFIX")
++if not eprefix:
++      eprefix = EPREFIX
+ repoman_settings = portage.config(local_config=False, _eprefix=eprefix)
  repoman_settings.lock()
  
  if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \
diff --cc man/emerge.1
Simple merge
Simple merge
Simple merge
index 4ce9efe2577065e415e7b4b6291115ce641688c7,72cdf2dbb54a8f3851ee8289d5066acb28410252..8b5426b516f24714ae26b8c235d9b28325851bea
@@@ -473,8 -472,9 +473,11 @@@ 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 not eprefix:
++              eprefix = EPREFIX
        settings = config(config_root=config_root, target_root=target_root,
-               config_incrementals=portage.const.INCREMENTALS, _eprefix=EPREFIX)
+               config_incrementals=portage.const.INCREMENTALS, _eprefix=eprefix)
        settings.lock()
  
        myroots = [(settings["ROOT"], settings)]
index 0c0e32010ba48e0936737b5e2792b77925826aab,c496c0b92d49851f9c437c4afa6124e2853e2287..354fc9c6e57f7bf4d719d65057e114874bc18667
@@@ -67,8 -63,11 +67,11 @@@ secpass=
  uid=os.getuid()
  wheelgid=0
  
 -if uid==0:
 +if uid==rootuid:
        secpass=2
+ elif "__PORTAGE_TEST_EPREFIX" in os.environ:
+       secpass = 2
  try:
        wheelgid=grp.getgrnam("wheel")[2]
  except KeyError:
Simple merge
Simple merge
index 2650f152331aa6dcddf52598bbb05f71b3b48669,17316635134c861766e674511fe2e20af5f8b62a..d4f3787367089abacec5ca0f77e7c5dc7bad9f97
@@@ -47,8 -46,13 +46,15 @@@ def env_update(makelinks=1, target_root
        if prev_mtimes is None:
                prev_mtimes = portage.mtimedb["ldpath"]
        if env is None:
-               env = os.environ
-       envd_dir = os.path.join(target_root, EPREFIX_LSTRIP, "etc", "env.d")
+               settings = os.environ
++              if 'EPREFIX' not in settings:
++                      settings['EPREFIX'] = portage.const.EPREFIX
+       else:
+               settings = env
+       eprefix = settings.get("EPREFIX", "")
+       eprefix_lstrip = eprefix.lstrip(os.sep)
+       envd_dir = os.path.join(target_root, eprefix_lstrip, "etc", "env.d")
        ensure_dirs(envd_dir, mode=0o755)
        fns = listdir(envd_dir, EmptyOnError=1)
        fns.sort()
        penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
        penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
        cenvnotice  = penvnotice[:]
-       penvnotice += "# GO INTO " + EPREFIX + "/etc/profile NOT /etc/profile.env\n\n"
-       cenvnotice += "# GO INTO " + EPREFIX + "/etc/csh.cshrc NOT /etc/csh.env\n\n"
 -      penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n"
 -      cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n"
++      penvnotice += "# GO INTO " + eprefix + "/etc/profile NOT /etc/profile.env\n\n"
++      cenvnotice += "# GO INTO " + eprefix + "/etc/csh.cshrc NOT /etc/csh.env\n\n"
  
        #create /etc/profile.env for bash support
-       outfile = atomic_ofstream(os.path.join(target_root, EPREFIX_LSTRIP, "etc", "profile.env"))
+       outfile = atomic_ofstream(os.path.join(
+               target_root, eprefix_lstrip, "etc", "profile.env"))
        outfile.write(penvnotice)
  
        env_keys = [ x for x in env if x != "LDPATH" ]
diff --cc runtests.sh
index dadd32db1c4ab403d9e41380b7fd2ace46658385,981fa1ec2ebad9b507ad2141d3b3a74b47133fb6..52f7bb0763a6b651180a7e98571ce6c3a63c1e16
@@@ -26,9 -26,9 +26,9 @@@ trap interrupted SIGIN
  
  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 ! @PREFIX_PORTAGE_PYTHON@${version} pym/portage/tests/runTests "$@" ; then
 -              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