public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: /
Date: Wed, 14 Dec 2011 15:25:53 +0000 (UTC)	[thread overview]
Message-ID: <87863efd98a474f01af099609903cbf7e7a3754d.grobian@gentoo> (raw)

commit:     87863efd98a474f01af099609903cbf7e7a3754d
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 14 15:23:13 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Dec 14 15:23:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=87863efd

Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix

Conflicts:
	bin/egencache
	bin/phase-functions.sh
	pym/portage/const.py
	pym/portage/data.py
	pym/portage/package/ebuild/_config/special_env_vars.py


 bin/ebuild-ipc.py                                  |   38 +++-
 bin/ebuild.sh                                      |    9 -
 bin/egencache                                      |    6 +-
 bin/lock-helper.py                                 |    1 +
 bin/phase-functions.sh                             |    7 +-
 bin/repoman                                        |   14 +-
 man/emerge.1                                       |    4 +-
 pym/_emerge/AbstractEbuildProcess.py               |   16 ++-
 pym/_emerge/Binpkg.py                              |    6 +-
 pym/_emerge/FifoIpcDaemon.py                       |   16 +-
 pym/_emerge/Scheduler.py                           |    2 +-
 pym/_emerge/SpawnProcess.py                        |   31 ++--
 pym/_emerge/actions.py                             |   19 +-
 pym/_emerge/emergelog.py                           |    9 +-
 pym/_emerge/main.py                                |    2 +-
 pym/portage/__init__.py                            |    2 +-
 pym/portage/_legacy_globals.py                     |    2 -
 pym/portage/const.py                               |    9 +-
 pym/portage/data.py                                |   65 ++++--
 pym/portage/dbapi/vartree.py                       |    4 +-
 pym/portage/locks.py                               |  221 ++++++++++++++------
 pym/portage/output.py                              |   15 +-
 .../package/ebuild/_config/LocationsManager.py     |    5 +-
 .../package/ebuild/_config/special_env_vars.py     |    8 +-
 pym/portage/package/ebuild/_spawn_nofetch.py       |    2 +-
 pym/portage/package/ebuild/config.py               |   50 +++--
 pym/portage/package/ebuild/doebuild.py             |   15 +-
 pym/portage/package/ebuild/fetch.py                |    3 +-
 pym/portage/package/ebuild/prepare_build_dirs.py   |    3 +-
 pym/portage/repository/config.py                   |    7 +-
 pym/portage/tests/dbapi/test_fakedbapi.py          |    2 +-
 pym/portage/tests/ebuild/test_doebuild_spawn.py    |    5 +
 pym/portage/tests/ebuild/test_ipc_daemon.py        |   13 +-
 pym/portage/tests/emerge/test_simple.py            |    7 +-
 pym/portage/tests/locks/test_asynchronous_lock.py  |   62 +++++-
 pym/portage/tests/locks/test_lock_nonblock.py      |   17 ++-
 pym/portage/tests/repoman/test_simple.py           |    6 +-
 pym/portage/tests/resolver/ResolverPlayground.py   |    6 +-
 pym/portage/util/movefile.py                       |    6 +-
 pym/portage/xpak.py                                |    2 +-
 pym/repoman/utilities.py                           |    2 +-
 41 files changed, 480 insertions(+), 239 deletions(-)

diff --cc bin/phase-functions.sh
index 331afc8,664202a..9aa033c
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@@ -28,7 -29,7 +29,7 @@@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_
  	PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERNAME \
  	PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR PORTDIR_OVERLAY \
  	PROFILE_PATHS REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \
- 	PORTAGE_OVERRIDE_EPREFIX ED EROOT"
 -	__PORTAGE_TEST_HARDLINK_LOCKS"
++	__PORTAGE_TEST_HARDLINK_LOCKS ED EROOT"
  
  PORTAGE_SAVED_READONLY_VARS="A CATEGORY P PF PN PR PV PVR"
  
diff --cc pym/_emerge/Binpkg.py
index 213ced2,6c70b19..e6e2e21
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@@ -20,9 -20,8 +21,9 @@@ from portage import _unicode_decod
  from portage import _unicode_encode
  import io
  import logging
- import shutil
+ import textwrap
  from portage.output import colorize
 +from portage.const import EPREFIX
  
  class Binpkg(CompositeTask):
  
diff --cc pym/portage/const.py
index 2223b4c,77c68eb..aa45cb2
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@@ -190,10 -145,8 +190,10 @@@ MANIFEST2_IDENTIFIERS    = ("AUX", "MIS
  # constant should be minimal, in favor of access via the EPREFIX setting of
  # a config instance (since it's possible to contruct a config instance with
  # a different EPREFIX). Therefore, the EPREFIX constant should *NOT* be used
- # in the definition of any other contstants within this file.
+ # in the definition of any other constants within this file.
 -EPREFIX=""
 +# PREFIX LOCAL: rely on EPREFIX from autotools
 +#EPREFIX=""
 +# END PREFIX LOCAL
  
  # pick up EPREFIX from the environment if set
  if "PORTAGE_OVERRIDE_EPREFIX" in os.environ:
diff --cc pym/portage/data.py
index f2f541f,cf94ab0..5651e7d
--- a/pym/portage/data.py
+++ b/pym/portage/data.py
@@@ -90,16 -86,8 +90,20 @@@ def _get_global(k)
  			secpass = 2
  		#Discover the uid and gid of the portage user/group
  		try:
++<<<<<<< HEAD
++=======
+ 			portage_uid = pwd.getpwnam(_get_global('_portage_username')).pw_uid
++>>>>>>> overlays-gentoo-org/master
  			portage_gid = grp.getgrnam(_get_global('_portage_grpname')).gr_gid
 +		except KeyError:
 +			# PREFIX LOCAL: some sysadmins are insane, bug #344307
 +			if _get_global('_portage_grpname').isdigit():
 +				portage_gid = int(_get_global('_portage_grpname'))
 +			else:
 +				portage_gid = None
 +			# END PREFIX LOCAL
 +		try:
 +			portage_uid = pwd.getpwnam(_get_global('_portage_uname')).pw_uid
  			if secpass < 1 and portage_gid in os.getgroups():
  				secpass = 1
  		except KeyError:
@@@ -149,16 -134,24 +153,28 @@@
  						pass
  				v = sorted(set(v))
  
+ 	# Avoid instantiating portage.settings when the desired
+ 	# variable is set in os.environ.
  	elif k == '_portage_grpname':
- 		env = getattr(portage, 'settings', os.environ)
- 		# PREFIX LOCAL: use var iso hardwired 'portage'
- 		v = env.get('PORTAGE_GRPNAME', PORTAGE_GROUPNAME)
- 		# END PREFIX LOCAL
- 	elif k == '_portage_uname':
- 		env = getattr(portage, 'settings', os.environ)
- 		# PREFIX LOCAL: use var iso hardwired 'portage'
- 		v = env.get('PORTAGE_USERNAME', PORTAGE_USERNAME)
- 		# END PREFIX LOCAL
+ 		v = None
+ 		if 'PORTAGE_GRPNAME' in os.environ:
+ 			v = os.environ['PORTAGE_GRPNAME']
+ 		elif hasattr(portage, 'settings'):
+ 			v = portage.settings.get('PORTAGE_GRPNAME')
+ 		if v is None:
 -			v = 'portage'
++			# PREFIX LOCAL: use var iso hardwired 'portage'
++			v = PORTAGE_GROUPNAME
++			# END PREFIX LOCAL
+ 	elif k == '_portage_username':
+ 		v = None
+ 		if 'PORTAGE_USERNAME' in os.environ:
+ 			v = os.environ['PORTAGE_USERNAME']
+ 		elif hasattr(portage, 'settings'):
+ 			v = portage.settings.get('PORTAGE_USERNAME')
+ 		if v is None:
 -			v = 'portage'
++			# PREFIX LOCAL: use var iso hardwired 'portage'
++			v = PORTAGE_USERNAME
++			# END PREFIX LOCAL
  	else:
  		raise AssertionError('unknown name: %s' % k)
  
@@@ -188,14 -181,13 +204,17 @@@ def _init(settings)
  	initialize global variables. This allows settings to come from make.conf
  	instead of requiring them to be set in the calling environment.
  	"""
- 	if '_portage_grpname' not in _initialized_globals:
- 		v = settings.get('PORTAGE_GRPNAME')
- 		if v is not None:
- 			globals()['_portage_grpname'] = v
- 			_initialized_globals.add('_portage_grpname')
- 
- 	if '_portage_uname' not in _initialized_globals:
- 		v = settings.get('PORTAGE_USERNAME')
- 		if v is not None:
- 			globals()['_portage_uname'] = v
- 			_initialized_globals.add('_portage_uname')
+ 	if '_portage_grpname' not in _initialized_globals and \
+ 		'_portage_username' not in _initialized_globals:
+ 
 -		v = settings.get('PORTAGE_GRPNAME', 'portage')
++		# PREFIX LOCAL: use var iso hardwired 'portage'
++		v = settings.get('PORTAGE_GRPNAME', PORTAGE_GROUPNAME)
++		# END PREFIX LOCAL
+ 		globals()['_portage_grpname'] = v
+ 		_initialized_globals.add('_portage_grpname')
+ 
 -		v = settings.get('PORTAGE_USERNAME', 'portage')
++		# PREFIX LOCAL: use var iso hardwired 'portage'
++		v = settings.get('PORTAGE_USERNAME', PORTAGE_USERNAME)
++		# END PREFIX LOCAL
+ 		globals()['_portage_username'] = v
+ 		_initialized_globals.add('_portage_username')
diff --cc pym/portage/dbapi/vartree.py
index 09d7721,a9a147a..edc3983
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@@ -27,11 -27,9 +27,12 @@@ portage.proxy.lazyimport.lazyimport(glo
  	'portage.util.digraph:digraph',
  	'portage.util.env_update:env_update',
  	'portage.util.listdir:dircache,listdir',
+ 	'portage.util.movefile:movefile',
  	'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',
diff --cc pym/portage/package/ebuild/_config/special_env_vars.py
index a2f6505,d6ee647..acff992
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@@ -66,9 -66,7 +66,9 @@@ environ_whitelist += 
  	"REPLACING_VERSIONS", "REPLACED_BY_VERSION",
  	"ROOT", "ROOTPATH", "T", "TMP", "TMPDIR",
  	"USE_EXPAND", "USE_ORDER", "WORKDIR",
- 	"XARGS", "PORTAGE_OVERRIDE_EPREFIX",
+ 	"XARGS", "__PORTAGE_TEST_HARDLINK_LOCKS",
 +	"BPREFIX", "DEFAULT_PATH", "EXTRA_PATH",
 +	"PORTAGE_GROUP", "PORTAGE_USER",
  ]
  
  # user config variables



             reply	other threads:[~2011-12-14 15:26 UTC|newest]

Thread overview: 195+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 15:25 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-25  9:40 [gentoo-commits] proj/portage:prefix commit in: / Fabian Groffen
2024-02-22  7:27 Fabian Groffen
2024-01-18 10:22 Fabian Groffen
2024-01-18  9:36 Fabian Groffen
2023-12-03 10:10 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-11-24 20:18 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-06-22  8:47 Fabian Groffen
2023-06-17  9:04 Fabian Groffen
2023-06-17  8:41 Fabian Groffen
2022-07-28 17:38 Fabian Groffen
2022-07-27 19:20 Fabian Groffen
2022-07-26 19:39 Fabian Groffen
2022-07-25 15:20 Fabian Groffen
2022-07-24 19:27 Fabian Groffen
2022-07-24 14:01 Fabian Groffen
2022-07-24  9:45 Fabian Groffen
2022-01-14 10:40 Fabian Groffen
2022-01-14 10:32 Fabian Groffen
2021-07-06  7:10 Fabian Groffen
2021-04-16 13:37 Fabian Groffen
2021-01-24  9:02 Fabian Groffen
2021-01-04 10:48 Fabian Groffen
2020-12-07 17:28 Fabian Groffen
2020-12-07 16:46 Fabian Groffen
2020-11-23  7:48 Fabian Groffen
2020-11-22 11:15 Fabian Groffen
2020-09-26 11:29 Fabian Groffen
2020-08-02 12:33 Fabian Groffen
2020-06-02 18:55 Fabian Groffen
2020-01-08 19:14 Fabian Groffen
2019-07-01 13:11 Fabian Groffen
2019-05-30  9:20 Fabian Groffen
2019-02-28 12:31 Fabian Groffen
2019-01-11 10:19 Fabian Groffen
2019-01-07 10:22 Fabian Groffen
2018-12-23 11:14 Fabian Groffen
2018-12-12 18:54 Fabian Groffen
2018-08-04  6:56 Fabian Groffen
2018-06-25  8:34 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-05-28 15:24 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-18 19:46 Fabian Groffen
2017-12-12  8:19 Fabian Groffen
2017-10-29 14:51 Fabian Groffen
2017-10-03  7:32 Fabian Groffen
2017-09-22 10:08 Fabian Groffen
2017-08-21 13:27 Fabian Groffen
2017-08-13  7:21 Fabian Groffen
2017-05-23 13:34 Fabian Groffen
2017-03-25  9:12 Fabian Groffen
2017-03-24 19:09 Fabian Groffen
2017-03-24  7:43 Fabian Groffen
2017-03-23 17:46 Fabian Groffen
2017-03-23 17:32 Fabian Groffen
2017-03-23 17:23 Fabian Groffen
2017-03-23 15:38 Fabian Groffen
2017-03-17  8:25 Fabian Groffen
2017-03-02  8:48 Fabian Groffen
2017-03-02  8:18 Fabian Groffen
2017-02-23 14:05 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2016-03-20 19:31 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2015-06-20  7:12 Fabian Groffen
2015-06-09 18:30 Fabian Groffen
2015-06-09 18:01 Fabian Groffen
2015-06-04 19:47 Fabian Groffen
2015-04-05  9:15 Fabian Groffen
2014-11-12 17:31 Fabian Groffen
2014-10-02 18:48 Fabian Groffen
2014-09-28 17:52 Fabian Groffen
2014-05-06 19:32 Fabian Groffen
2014-05-06 19:18 Fabian Groffen
2014-04-22 19:52 Fabian Groffen
2014-02-06 21:09 Fabian Groffen
2014-01-06  9:47 Fabian Groffen
2013-09-24 17:29 Fabian Groffen
2013-09-20 17:59 Fabian Groffen
2013-09-18 18:34 Fabian Groffen
2013-09-13 18:02 Fabian Groffen
2013-08-10 20:54 Fabian Groffen
2013-07-10  5:31 Fabian Groffen
2013-07-08 19:32 Fabian Groffen
2013-06-29  5:41 Fabian Groffen
2013-06-27 17:20 Fabian Groffen
2013-06-12  9:02 Fabian Groffen
2013-06-09 15:53 Fabian Groffen
2013-05-04 18:55 Fabian Groffen
2013-04-02 16:57 Fabian Groffen
2013-03-31 19:03 Fabian Groffen
2013-03-31 19:00 Fabian Groffen
2013-03-24  8:36 Fabian Groffen
2013-03-23 19:54 Fabian Groffen
2013-02-28 19:29 Fabian Groffen
2013-02-07 20:01 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-13 10:26 Fabian Groffen
2013-01-10 21:02 Fabian Groffen
2013-01-05 18:14 Fabian Groffen
2012-12-26 14:48 Fabian Groffen
2012-12-02 15:47 Fabian Groffen
2012-12-02 15:36 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 13:12 Fabian Groffen
2012-12-02 12:59 Fabian Groffen
2012-11-04 10:48 Fabian Groffen
2012-10-22 17:25 Fabian Groffen
2012-10-02 12:02 Fabian Groffen
2012-09-30 11:22 Fabian Groffen
2012-09-26 18:26 Fabian Groffen
2012-09-12 18:18 Fabian Groffen
2012-09-09  7:40 Fabian Groffen
2012-09-06 18:14 Fabian Groffen
2012-08-27  6:44 Fabian Groffen
2012-08-12  7:50 Fabian Groffen
2012-07-19 16:25 Fabian Groffen
2012-07-06  7:05 Fabian Groffen
2012-04-23 19:23 Fabian Groffen
2012-04-03 18:04 Fabian Groffen
2012-03-31 19:31 Fabian Groffen
2012-03-01 20:32 Fabian Groffen
2012-02-19  9:58 Fabian Groffen
2012-02-09  8:01 Fabian Groffen
2012-01-10 17:45 Fabian Groffen
2011-12-31 16:45 Fabian Groffen
2011-12-26  9:12 Fabian Groffen
2011-12-23  9:51 Fabian Groffen
2011-12-22  9:51 Fabian Groffen
2011-12-19 18:30 Fabian Groffen
2011-12-10 11:28 Fabian Groffen
2011-12-09 20:33 Fabian Groffen
2011-12-02 20:31 Fabian Groffen
2011-12-02 19:20 Fabian Groffen
2011-12-02 19:19 Fabian Groffen
2011-12-02 19:18 Fabian Groffen
2011-12-02 18:03 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-20 20:28 Fabian Groffen
2011-10-20 17:08 Fabian Groffen
2011-10-20 16:38 Fabian Groffen
2011-10-17 18:36 Fabian Groffen
2011-10-16 13:59 Fabian Groffen
2011-10-15 18:27 Fabian Groffen
2011-10-13  6:52 Fabian Groffen
2011-09-23 18:38 Fabian Groffen
2011-09-23 18:23 Fabian Groffen
2011-09-20 18:25 Fabian Groffen
2011-09-14 18:43 Fabian Groffen
2011-09-14 18:38 Fabian Groffen
2011-09-13 17:41 Fabian Groffen
2011-08-31 18:39 Fabian Groffen
2011-08-30 18:45 Fabian Groffen
2011-08-29 19:03 Fabian Groffen
2011-08-25 20:25 Fabian Groffen
2011-08-20 17:50 Fabian Groffen
2011-07-26 17:35 Fabian Groffen
2011-07-17  9:48 Fabian Groffen
2011-07-17  8:12 Fabian Groffen
2011-07-01 17:44 Fabian Groffen
2011-06-14 15:39 Fabian Groffen
2011-06-06 17:12 Fabian Groffen
2011-05-28  8:29 Fabian Groffen
2011-05-27 17:41 Fabian Groffen
2011-05-14 13:59 Fabian Groffen
2011-05-02 17:41 Fabian Groffen
2011-04-24 12:08 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-03-28 16:52 Fabian Groffen
2011-03-23 19:26 Fabian Groffen
2011-03-17 19:08 Fabian Groffen
2011-03-13 14:45 Fabian Groffen
2011-03-09 19:44 Fabian Groffen
2011-02-26 21:15 Fabian Groffen
2011-02-10 18:46 Fabian Groffen
2011-02-10 18:44 Fabian Groffen
2011-02-10 18:20 Fabian Groffen
2011-02-05 12:25 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87863efd98a474f01af099609903cbf7e7a3754d.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox