public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2017-11-07 23:14 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2017-11-07 23:14 UTC (permalink / raw
  To: gentoo-commits

commit:     007c84b4e5169d1cf44dc7c59c8b3ea793a18bc2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  7 23:14:17 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov  7 23:14:41 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=007c84b4

Quickfix handling manifest-required-hashes = None

 pym/portage/package/ebuild/digestgen.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 40c1b7288..6f3f877cd 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -11,6 +11,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 )
 
 from portage import os
+from portage.const import MANIFEST2_HASH_DEFAULTS
 from portage.dbapi.porttree import FetchlistDict
 from portage.dep import use_reduce
 from portage.exception import InvalidDependString, FileNotFound, \
@@ -58,6 +59,8 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 			mf = mysettings.repositories.get_repo_for_location(mytree)
 
 		repo_required_hashes = mf.manifest_required_hashes
+		if repo_required_hashes is None:
+			repo_required_hashes = MANIFEST2_HASH_DEFAULTS
 		mf = mf.load_manifest(mysettings["O"], mysettings["DISTDIR"],
 			fetchlist_dict=fetchlist_dict)
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-07-15 21:54 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2018-07-15 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     2de6ba26fd45fe942329ac928029e4edf603e125
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 15 04:54:45 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul 15 21:47:33 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2de6ba26

config: cache profile.bashrc stat results (bug 649806)

Optimize config to stat profile.bashrc files once in the constructor,
in order to avoid repeated stat calls in the setcpv method.

Bug: https://bugs.gentoo.org/649806
Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 88acac5cc..320d9f6c0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -274,6 +274,7 @@ class config(object):
 			self.mycpv = clone.mycpv
 			self._setcpv_args_hash = clone._setcpv_args_hash
 			self._soname_provided = clone._soname_provided
+			self._profile_bashrc = clone._profile_bashrc
 
 			# immutable attributes (internal policy ensures lack of mutation)
 			self._locations_manager = clone._locations_manager
@@ -725,6 +726,10 @@ class config(object):
 				self._license_manager.extract_global_changes( \
 					self.configdict["conf"].get("ACCEPT_LICENSE", ""))
 
+			# profile.bashrc
+			self._profile_bashrc = tuple(os.path.isfile(os.path.join(profile.location, 'profile.bashrc'))
+				for profile in profiles_complex)
+
 			if local_config:
 				#package.properties
 				propdict = grabdict_package(os.path.join(
@@ -1596,11 +1601,9 @@ class config(object):
 
 		bashrc_files = []
 
-		for profile in self._locations_manager.profiles_complex:
-			profile_bashrc = os.path.join(profile.location,
-				'profile.bashrc')
-			if os.path.exists(profile_bashrc):
-				bashrc_files.append(profile_bashrc)
+		for profile, profile_bashrc in zip(self._locations_manager.profiles_complex, self._profile_bashrc):
+			if profile_bashrc:
+				bashrc_files.append(os.path.join(profile.location, 'profile.bashrc'))
 			if profile in self._pbashrcdict:
 				cpdict = self._pbashrcdict[profile].get(cp)
 				if cpdict:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-06-23  9:24 Ulrich Müller
  0 siblings, 0 replies; 191+ messages in thread
From: Ulrich Müller @ 2018-06-23  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     294f1a18f3271f7d506d346c2a514a2afa6ce8ec
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 23 09:22:18 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 23 09:22:18 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=294f1a18

Revert "_post_src_install_uid_fix: allow files with portage group permissions (bug 600804)"

This reverts commit f479a4cdcac5db92231f489f232f10eb934c6f12.
Acked by zmedico in #gentoo-portage.

Bug: https://bugs.gentoo.org/600804

 pym/portage/package/ebuild/doebuild.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 0e94de805..97a9199a3 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -2045,7 +2045,7 @@ def _postinst_bsdflags(mysettings):
 def _post_src_install_uid_fix(mysettings, out):
 	"""
 	Files in $D with user and group bits that match the "portage"
-	user and group are automatically mapped to PORTAGE_INST_UID and
+	user or group are automatically mapped to PORTAGE_INST_UID and
 	PORTAGE_INST_GID if necessary. The chown system call may clear
 	S_ISUID and S_ISGID bits, so those bits are restored if
 	necessary.
@@ -2191,11 +2191,8 @@ def _post_src_install_uid_fix(mysettings, out):
 					mystat.st_ino not in counted_inodes:
 					counted_inodes.add(mystat.st_ino)
 					size += mystat.st_size
-
-				# Only remap the UID/GID if both match the portage user,
-				# in order to avoid interference with ebuilds that install
-				# files with portage group permissions (see bug 600804).
-				if (mystat.st_uid, mystat.st_gid) != (portage_uid, portage_gid):
+				if mystat.st_uid != portage_uid and \
+					mystat.st_gid != portage_gid:
 					continue
 				myuid = -1
 				mygid = -1


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-05-26  6:09 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2018-05-26  6:09 UTC (permalink / raw
  To: gentoo-commits

commit:     cd44fea4c8c8154fee74bcc37529c0d5c2e9d789
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 26 05:46:36 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat May 26 06:07:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd44fea4

prepare_build_dirs: convert PermissionError to PermissionDenied (bug 656542)

This supresses display of a big PermissionError traceback for
bin/ebuild, like in https://bugs.gentoo.org/656542#c0, and also
suppresses additional messages that may occur when the unhandled
PermissionError prevents bin/ebuild from cleanly closing the asyncio
event loop.

Bug: https://bugs.gentoo.org/656542

 pym/portage/package/ebuild/prepare_build_dirs.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 21e2aa87c..e53ccd0fb 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -19,6 +19,7 @@ from portage.localization import _
 from portage.output import colorize
 from portage.util import apply_recursive_permissions, \
 	apply_secpass_permissions, ensure_dirs, normalize_path, writemsg
+from portage.util.install_mask import _raise_exc
 from portage.const import EPREFIX
 
 def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
@@ -50,7 +51,9 @@ def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
 					clean_dir, noiselevel=-1)
 				return 1
 			else:
-				raise
+				# Wrap with PermissionDenied if appropriate, so that callers
+				# display a short error message without a traceback.
+				_raise_exc(oe)
 
 	def makedirs(dir_path):
 		try:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-05-24 19:45 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2018-05-24 19:45 UTC (permalink / raw
  To: gentoo-commits

commit:     28d3c9ed46b16757626b292dd6d7a6cae054b669
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 19:40:10 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 24 19:42:13 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=28d3c9ed

doebuild: eliminate redundant aux_get calls (bug 656394)

These redundant aux_get calls triggered event loop recursion
when called via EbuildFetchonly as reported in bug 656394.

Bug: https://bugs.gentoo.org/656394

 pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index c3b89ade2..dc443df00 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1048,9 +1048,11 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			mydo not in ("digest", "manifest") and "noauto" not in features)
 		if need_distfiles:
 
-			src_uri, = mydbapi.aux_get(mysettings.mycpv,
-				["SRC_URI"], mytree=os.path.dirname(os.path.dirname(
-				os.path.dirname(myebuild))))
+			src_uri = mysettings.configdict["pkg"].get("SRC_URI")
+			if src_uri is None:
+				src_uri, = mydbapi.aux_get(mysettings.mycpv,
+					["SRC_URI"], mytree=os.path.dirname(os.path.dirname(
+					os.path.dirname(myebuild))))
 			metadata = {
 				"EAPI"    : mysettings["EAPI"],
 				"SRC_URI" : src_uri,
@@ -1410,9 +1412,14 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
 	all_keys = set(Package.metadata_keys)
 	all_keys.add("SRC_URI")
 	all_keys = tuple(all_keys)
-	metadata = dict(zip(all_keys,
-		mydbapi.aux_get(mysettings.mycpv, all_keys,
-		myrepo=mysettings.get("PORTAGE_REPO_NAME"))))
+	metadata = mysettings.configdict['pkg']
+	if all(k in metadata for k in ("PORTAGE_REPO_NAME", "SRC_URI")):
+		metadata = dict(((k, metadata[k]) for k in all_keys if k in metadata),
+			repository=metadata["PORTAGE_REPO_NAME"])
+	else:
+		metadata = dict(zip(all_keys,
+			mydbapi.aux_get(mysettings.mycpv, all_keys,
+			myrepo=mysettings.get("PORTAGE_REPO_NAME"))))
 
 	class FakeTree(object):
 		def __init__(self, mydb):


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-05-03 18:48 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2018-05-03 18:48 UTC (permalink / raw
  To: gentoo-commits

commit:     1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May  3 00:55:48 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May  3 18:45:07 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b511055

config.environ: always strip slash from SYSROOT (bug 654600)

Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
and no EAPI expects SYSROOT to have a trailing slash, always strip
the trailing slash from SYSROOT.

Bug: https://bugs.gentoo.org/654600
Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in EAPI 7")
Reviewed-by: James Le Cuirot <chewi <AT> gentoo.org>
Reviewed-by: Michał Górny <mgorny <AT> gentoo.org>
Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f9b257b86..88acac5cc 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2813,11 +2813,16 @@ class config(object):
 			mydict.pop("ECLASSDIR", None)
 
 		if not eapi_attrs.path_variables_end_with_trailing_slash:
-			for v in ("D", "ED", "ROOT", "EROOT", "SYSROOT", "ESYSROOT",
-					"BROOT"):
+			for v in ("D", "ED", "ROOT", "EROOT", "ESYSROOT", "BROOT"):
 				if v in mydict:
 					mydict[v] = mydict[v].rstrip(os.path.sep)
 
+		# Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
+		# and no EAPI expects SYSROOT to have a trailing slash, always strip
+		# the trailing slash from SYSROOT.
+		if 'SYSROOT' in mydict:
+			mydict['SYSROOT'] = mydict['SYSROOT'].rstrip(os.sep)
+
 		try:
 			builddir = mydict["PORTAGE_BUILDDIR"]
 			distdir = mydict["DISTDIR"]


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-03-03 22:24 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2018-03-03 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     891926ba231380c4aa0768be0aa0ae1ed2bc6ae7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  3 21:49:26 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar  3 22:10:07 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=891926ba

_spawn_actionmap: simplify nosandbox logic

Remove a nosandbox assignment that never executes, since the condition for
the 'if' statement always evaluates to False:

nosandbox = ( "userpriv" in features and
              "usersandbox" not in features and
              "userpriv" not in restrict and
              "nouserpriv" not in restrict )

If nosandbox is True, it implies that the following expression is False:

            ( "userpriv" not in features or
              "userpriv" in restrict or
              "nouserpriv" in restrict )

Therefore, the condition for the 'if' statement always evaluates to False.

Reported-by: Douglas Freed <dwfreed <AT> mtu.edu>

 pym/portage/package/ebuild/doebuild.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 17fc8ccf4..8c8f373bf 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1354,11 +1354,6 @@ def _spawn_actionmap(settings):
 		("usersandbox" not in features) and \
 		"userpriv" not in restrict and \
 		"nouserpriv" not in restrict)
-	if nosandbox and ("userpriv" not in features or \
-		"userpriv" in restrict or \
-		"nouserpriv" in restrict):
-		nosandbox = ("sandbox" not in features and \
-			"usersandbox" not in features)
 
 	if not portage.process.sandbox_capable:
 		nosandbox = True


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-02-05 19:25 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2018-02-05 19:25 UTC (permalink / raw
  To: gentoo-commits

commit:     19ba736dabd1ade71ce7dc10f27d465e9a9af770
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 22:01:45 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 19:24:52 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=19ba736d

portage.package.ebuild.config: Rename iuse_implicit -> iuse_effective

Rename the iuse_implicit variable used in USE_EXPAND handling to
iuse_effective, since that is what is actually passed there. Correct
naming makes figuring out what the function does much easier.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 5624e86d3..35cf4f614 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1307,13 +1307,13 @@ class config(object):
 		"""
 
 		def __init__(self, settings, unfiltered_use,
-			use, usemask, iuse_implicit,
+			use, usemask, iuse_effective,
 			use_expand_split, use_expand_dict):
 			self._settings = settings
 			self._unfiltered_use = unfiltered_use
 			self._use = use
 			self._usemask = usemask
-			self._iuse_implicit = iuse_implicit
+			self._iuse_effective = iuse_effective
 			self._use_expand_split = use_expand_split
 			self._use_expand_dict = use_expand_dict
 
@@ -1331,7 +1331,7 @@ class config(object):
 			if has_wildcard:
 				var_split = [ x for x in var_split if x != "*" ]
 			has_iuse = set()
-			for x in self._iuse_implicit:
+			for x in self._iuse_effective:
 				if x[:prefix_len] == prefix:
 					has_iuse.add(x[prefix_len:])
 			if has_wildcard:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-01-27 10:19 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2018-01-27 10:19 UTC (permalink / raw
  To: gentoo-commits

commit:     0950357f5ad30e5c0633ebcd5f417a093ad252b1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 27 10:00:16 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 10:19:47 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0950357f

doebuild: Remove unnecessary restore of PORTAGE_ACTUAL_DISTDIR

Now that the DISTDIR override does not leak to global settings instance,
there is no need to restore it afterwards. Suggested by Zac Medico.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index c8df9b744..17fc8ccf4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1250,11 +1250,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 
 		mysettings.pop("REPLACING_VERSIONS", None)
 
-		# Make sure that DISTDIR is restored to it's normal value before we return!
-		if "PORTAGE_ACTUAL_DISTDIR" in mysettings:
-			mysettings["DISTDIR"] = mysettings["PORTAGE_ACTUAL_DISTDIR"]
-			del mysettings["PORTAGE_ACTUAL_DISTDIR"]
-
 		if logfile and not returnpid:
 			try:
 				if os.stat(logfile).st_size == 0:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-01-27 10:19 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2018-01-27 10:19 UTC (permalink / raw
  To: gentoo-commits

commit:     28ab348d318e26b32073eb910756ec9c0727042b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 27 08:53:59 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 10:19:30 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=28ab348d

prepare_build_dirs: Fix duplicate override of DISTDIR for 'ebuild'

Fix the duplicate override of DISTDIR that happens when using
the 'ebuild' tool to run ebuilds. In this case, both the 'config'
code and the 'prepare_build_dirs' code attempt to replace DISTDIR,
and the shadow distdir symlinks end up pointing to themselves.

As suggested by Zac Medico, after removing this override DISTDIR
in settings will always be the real directory, so there is no need
for a PORTAGE_ACTUAL_DISTDIR check here.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/package/ebuild/prepare_build_dirs.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 16afc3f98..21e2aa87c 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -412,9 +412,7 @@ def _prepare_fake_filesdir(settings):
 
 def _prepare_fake_distdir(settings, alist):
 	orig_distdir = settings["DISTDIR"]
-	settings["PORTAGE_ACTUAL_DISTDIR"] = orig_distdir
-	edpath = settings["DISTDIR"] = \
-		os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
+	edpath = os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
 	portage.util.ensure_dirs(edpath, gid=portage_gid, mode=0o755)
 
 	# Remove any unexpected files or directories.


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2018-01-26 14:59 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2018-01-26 14:59 UTC (permalink / raw
  To: gentoo-commits

commit:     8aa99e78bb89615bb25044183e160a7bf7facc2d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 25 08:29:07 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 26 14:58:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8aa99e78

portage.package.ebuild.config: Override DISTDIR unconditionally

Ensure that DISTDIR is always defined to the path to the shadow
directory. This ensures that PMS rules for consistent value are
followed, and that no global scope calls should be able to access
the distfile directory. This also ensures that global-scope assignments
(e.g. in PATCHES) do not work around the shadow directory.

Bug: https://bugs.gentoo.org/612972
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index d0225a311..5624e86d3 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2016 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -2848,6 +2848,15 @@ class config(object):
 				else:
 					raise AssertionError("C locale did not pass the test!")
 
+		try:
+			builddir = mydict["PORTAGE_BUILDDIR"]
+			distdir = mydict["DISTDIR"]
+		except KeyError:
+			pass
+		else:
+			mydict["PORTAGE_ACTUAL_DISTDIR"] = distdir
+			mydict["DISTDIR"] = os.path.join(builddir, "distdir")
+
 		return mydict
 
 	def thirdpartymirrors(self):


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2017-11-10  0:32 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2017-11-10  0:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f68cbfdfb24218ea11db6e0322a0f05413833b0f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 10 00:26:13 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 10 00:32:22 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f68cbfdf

doebuild: record BUILD_ID and BINPKGMD5 for installed package

This is equivalent to the EbuildBuild._record_binpkg_info method
which never gets called when the package is created with the
ebuild(1) command.

Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7")

 pym/portage/package/ebuild/doebuild.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 66e63b919..0be148fd4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1163,8 +1163,23 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 
 			if retval == os.EX_OK:
 				if mydo == "package" and bintree is not None:
-					bintree.inject(mysettings.mycpv,
+					pkg = bintree.inject(mysettings.mycpv,
 						filename=mysettings["PORTAGE_BINPKG_TMPFILE"])
+					if pkg is not None:
+						infoloc = os.path.join(
+							mysettings["PORTAGE_BUILDDIR"], "build-info")
+						build_info = {
+							"BINPKGMD5": "%s\n" % pkg._metadata["MD5"],
+						}
+						if pkg.build_id is not None:
+							build_info["BUILD_ID"] = "%s\n" % pkg.build_id
+						for k, v in build_info.items():
+							with io.open(_unicode_encode(
+								os.path.join(infoloc, k),
+								encoding=_encodings['fs'], errors='strict'),
+								mode='w', encoding=_encodings['repo.content'],
+								errors='strict') as f:
+								f.write(v)
 			else:
 				if "PORTAGE_BINPKG_TMPFILE" in mysettings:
 					try:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2017-07-30  0:07 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2017-07-30  0:07 UTC (permalink / raw
  To: gentoo-commits

commit:     fa1ba6318e114cd9f3bb5b4e61ed3dab7521bc19
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 00:03:25 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 00:07:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=fa1ba631

config.validate: check for invalid BINPKG_COMPRESSION

 pym/portage/package/ebuild/config.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f8043dbf5..3d232e0be 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -25,6 +25,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 	'portage.dep.soname.SonameAtom:SonameAtom',
 	'portage.dbapi.vartree:vartree',
 	'portage.package.ebuild.doebuild:_phase_func_map',
+	'portage.util.compression_probe:_compressors',
 	'portage.util.locale:check_locale,split_LC_ALL',
 )
 from portage import bsd_chflags, \
@@ -1171,6 +1172,32 @@ class config(object):
 				writemsg(_("!!! See https://bugs.pypy.org/issue833 for details.\n"),
 					noiselevel=-1)
 
+		binpkg_compression = self.get("BINPKG_COMPRESSION")
+		if binpkg_compression:
+			try:
+				compression = _compressors[binpkg_compression]
+			except KeyError as e:
+				writemsg("!!! BINPKG_COMPRESSION contains invalid or "
+					"unsupported compression method: %s" % e.args[0],
+					noiselevel=-1)
+			else:
+				try:
+					compression_binary = shlex_split(
+						portage.util.varexpand(compression["compress"],
+						mydict=self))[0]
+				except IndexError as e:
+					writemsg("!!! BINPKG_COMPRESSION contains invalid or "
+						"unsupported compression method: %s" % e.args[0],
+						noiselevel=-1)
+				else:
+					if portage.process.find_binary(
+						compression_binary) is None:
+						missing_package = compression["package"]
+						writemsg("!!! BINPKG_COMPRESSION unsupported %s. "
+							"Missing package: %s" %
+							(binpkg_compression, missing_package),
+							noiselevel=-1)
+
 	def load_best_module(self,property_string):
 		best_mod = best_from_dict(property_string,self.modules,self.module_priority)
 		mod = None


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2017-03-14 16:30 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2017-03-14 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     8cee37265f4617ac54f5aaafbe3c647dff6472fc
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Tue Mar 14 07:09:23 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar 14 16:30:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8cee3726

Fix wrong cast of valid_hashes to frozenset

valid_hashes must be a set, not frozenset.

Closes: https://github.com/gentoo/portage/pull/138
Fixes: b33c965283
Gentoo-Bug: 612578

 pym/portage/package/ebuild/fetch.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 5c4b74446..0431e11ea 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -551,7 +551,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 	distdir_writable = can_fetch and not fetch_to_ro
 	failed_files = set()
 	restrict_fetch_msg = False
-	valid_hashes = frozenset(get_valid_checksum_keys())
+	valid_hashes = set(get_valid_checksum_keys())
 	valid_hashes.discard("size")
 
 	for myfile in filedict:
@@ -568,8 +568,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 		if not (allow_missing_digests or listonly):
 			verifiable_hash_types = set(orig_digests).intersection(valid_hashes)
 			if not verifiable_hash_types:
-				expected = set(valid_hashes)
-				expected = " ".join(sorted(expected))
+				expected = " ".join(sorted(valid_hashes))
 				got = set(orig_digests)
 				got.discard("size")
 				got = " ".join(sorted(got))


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2017-03-10  1:46 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2017-03-10  1:46 UTC (permalink / raw
  To: gentoo-commits

commit:     3ccd41702be7ed3f5bdbe123ec04349749b40c08
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 21:31:21 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 10 01:45:27 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3ccd4170

config.setcpv: fix handling of IUSE changes (bug 611896)

Fix setcpv to correctly regenerate USE when the IUSE differs from
the previous setcpv call. Changes in IUSE affect USE_EXPAND
wildcard expansion in the regenerate method.

X-Gentoo-bug: 611896
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=611896
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 4f7e5c93c..ef29afeab 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1623,6 +1623,10 @@ class config(object):
 		elif previous_penv:
 			has_changed = True
 
+		if not (previous_iuse == iuse and
+			previous_iuse_effective is not None == eapi_attrs.iuse_effective):
+			has_changed = True
+
 		if has_changed:
 			self.reset(keeping_pkg=1)
 
@@ -1645,8 +1649,7 @@ class config(object):
 
 		# If reset() has not been called, it's safe to return
 		# early if IUSE has not changed.
-		if not has_changed and previous_iuse == iuse and \
-			(previous_iuse_effective is not None == eapi_attrs.iuse_effective):
+		if not has_changed:
 			return
 
 		# Filter out USE flags that aren't part of IUSE. This has to


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-11-30  1:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-11-30  1:10 UTC (permalink / raw
  To: gentoo-commits

commit:     f479a4cdcac5db92231f489f232f10eb934c6f12
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 29 20:31:06 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 00:32:27 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f479a4cd

_post_src_install_uid_fix: allow files with portage group permissions (bug 600804)

Allow ebuilds to install files with portage group permissions, as
a means to restrict access to package manager resources.

X-Gentoo-Bug: 600804
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=600804
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 52dbf8b..4baae17 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -2008,7 +2008,7 @@ def _postinst_bsdflags(mysettings):
 def _post_src_install_uid_fix(mysettings, out):
 	"""
 	Files in $D with user and group bits that match the "portage"
-	user or group are automatically mapped to PORTAGE_INST_UID and
+	user and group are automatically mapped to PORTAGE_INST_UID and
 	PORTAGE_INST_GID if necessary. The chown system call may clear
 	S_ISUID and S_ISGID bits, so those bits are restored if
 	necessary.
@@ -2154,8 +2154,11 @@ def _post_src_install_uid_fix(mysettings, out):
 					mystat.st_ino not in counted_inodes:
 					counted_inodes.add(mystat.st_ino)
 					size += mystat.st_size
-				if mystat.st_uid != portage_uid and \
-					mystat.st_gid != portage_gid:
+
+				# Only remap the UID/GID if both match the portage user,
+				# in order to avoid interference with ebuilds that install
+				# files with portage group permissions (see bug 600804).
+				if (mystat.st_uid, mystat.st_gid) != (portage_uid, portage_gid):
 					continue
 				myuid = -1
 				mygid = -1


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-09-24  7:23 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-09-24  7:23 UTC (permalink / raw
  To: gentoo-commits

commit:     96338b8a2add3ab5f7f77fef41570807374771e3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 06:48:52 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 06:48:59 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=96338b8a

doebuild_environment: disable ccache/distcc/icecc when necessary (bug 594982)

Fixes: a41c0f8b9081 ("doebuild: Support finding lib* for ccache/distcc/icecc masquerade dir")
X-Gentoo-Bug: 594982
X-Gentoo-Bug-URL: https://bugs.gentoo.org/594982

 pym/portage/package/ebuild/doebuild.py           | 9 +++++----
 pym/portage/package/ebuild/prepare_build_dirs.py | 6 ------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 26ecc75..52dbf8b 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -478,13 +478,13 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 			possible_libexecdirs = (libdir, "lib", "libexec")
 			masquerades = []
 			if distcc:
-				masquerades.append("distcc")
+				masquerades.append(("distcc", "distcc"))
 			if icecream:
-				masquerades.append("icecc")
+				masquerades.append(("icecream", "icecc"))
 			if ccache:
-				masquerades.append("ccache")
+				masquerades.append(("ccache", "ccache"))
 
-			for m in masquerades:
+			for feature, m in masquerades:
 				for l in possible_libexecdirs:
 					p = os.path.join(os.sep, eprefix_lstrip,
 							"usr", l, m, "bin")
@@ -494,6 +494,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 				else:
 					writemsg(("Warning: %s requested but no masquerade dir"
 						+ "can be found in /usr/lib*/%s/bin\n") % (m, m))
+					mysettings.features.remove(feature)
 
 		if 'MAKEOPTS' not in mysettings:
 			nproc = get_cpu_count()

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 7fdac74..7e5249b 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -154,12 +154,10 @@ def _prepare_features_dirs(mysettings):
 
 	features_dirs = {
 		"ccache":{
-			"path_dir": "%s/usr/%s/ccache/bin" % (EPREFIX, libdir),
 			"basedir_var":"CCACHE_DIR",
 			"default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "ccache"),
 			"always_recurse":False},
 		"distcc":{
-			"path_dir": "%s/usr/%s/distcc/bin" % (EPREFIX, libdir),
 			"basedir_var":"DISTCC_DIR",
 			"default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
 			"subdirs":("lock", "state"),
@@ -180,10 +178,6 @@ def _prepare_features_dirs(mysettings):
 				basedir = kwargs["default_dir"]
 				mysettings[kwargs["basedir_var"]] = basedir
 			try:
-				path_dir = kwargs["path_dir"]
-				if not os.path.isdir(path_dir):
-					raise DirectoryNotFound(path_dir)
-
 				mydirs = [mysettings[kwargs["basedir_var"]]]
 				if "subdirs" in kwargs:
 					for subdir in kwargs["subdirs"]:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-09-14 21:39 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-09-14 21:39 UTC (permalink / raw
  To: gentoo-commits

commit:     298bd98dabaa92e85a57795fa37ef47d3379092d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  7 22:38:49 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 21:39:04 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=298bd98d

config.setcpv: add recursion assertion

 pym/portage/package/ebuild/config.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 7de4df7..505c7a2 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1372,6 +1372,21 @@ class config(object):
 
 			return value
 
+	def _setcpv_recursion_gate(f):
+		"""
+		Raise AssertionError for recursive setcpv calls.
+		"""
+		def wrapper(self, *args, **kwargs):
+			if hasattr(self, '_setcpv_active'):
+				raise AssertionError('setcpv recursion detected')
+			self._setcpv_active = True
+			try:
+				return f(self, *args, **kwargs)
+			finally:
+				del self._setcpv_active
+		return wrapper
+
+	@_setcpv_recursion_gate
 	def setcpv(self, mycpv, use_cache=None, mydb=None):
 		"""
 		Load a particular CPV into the config, this lets us see the


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-09-14 21:28 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-09-14 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     295d658510009cae54602aced9322702ec8c8180
Author:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
AuthorDate: Wed Sep 14 21:17:24 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 21:27:17 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=295d6585

config.environ: handle missing ctypes for check_locale (bug 584328)

X-Gentoo-bug: 584328
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=584328

 pym/portage/package/ebuild/config.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 45b7d08..7de4df7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Gentoo Foundation
+# Copyright 2010-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -2790,7 +2790,8 @@ class config(object):
 		if eapi_attrs.posixish_locale:
 			split_LC_ALL(mydict)
 			mydict["LC_COLLATE"] = "C"
-			if not check_locale(silent=True, env=mydict):
+			# check_locale() returns None when check can not be executed.
+			if check_locale(silent=True, env=mydict) is False:
 				# try another locale
 				for l in ("C.UTF-8", "en_US.UTF-8", "en_GB.UTF-8", "C"):
 					mydict["LC_CTYPE"] = l


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-06-06 15:50 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-06-06 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     67239a3f48989794ffe484206bc6afc40156d9db
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  6 15:48:01 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 15:49:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=67239a3f

Account for EPREFIX in ccache and distcc dirs (bug 582802)

X-Gentoo-Bug: 582802
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=582802

 pym/portage/package/ebuild/prepare_build_dirs.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index ce54fdf..7fdac74 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -19,6 +19,7 @@ from portage.localization import _
 from portage.output import colorize
 from portage.util import apply_recursive_permissions, \
 	apply_secpass_permissions, ensure_dirs, normalize_path, writemsg
+from portage.const import EPREFIX
 
 def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
 	"""
@@ -153,12 +154,12 @@ def _prepare_features_dirs(mysettings):
 
 	features_dirs = {
 		"ccache":{
-			"path_dir": "/usr/%s/ccache/bin" % (libdir,),
+			"path_dir": "%s/usr/%s/ccache/bin" % (EPREFIX, libdir),
 			"basedir_var":"CCACHE_DIR",
 			"default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "ccache"),
 			"always_recurse":False},
 		"distcc":{
-			"path_dir": "/usr/%s/distcc/bin" % (libdir,),
+			"path_dir": "%s/usr/%s/distcc/bin" % (EPREFIX, libdir),
 			"basedir_var":"DISTCC_DIR",
 			"default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
 			"subdirs":("lock", "state"),


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2016-02-23 20:32 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2016-02-23 20:32 UTC (permalink / raw
  To: gentoo-commits

commit:     db30bb430e5a022f6e358f32dbccba243637bf49
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 23 17:21:09 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 20:31:49 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=db30bb43

doebuild: abort for missing DIST digests

Fix the ebuild(1) command to abort when DIST digests are missing,
so behavior is consistent with emerge. Do not abort when generating
a manifest (including when "digest" is in FEATURES), or when the
ebuild --skip-manifest option is used (these cases are handled
outside of the doebuild function).

Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index a4d4d9f..d926e03 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1033,7 +1033,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			if mf is not None:
 				dist_digests = mf.getTypeDigests("DIST")
 			if not fetch(fetchme, mysettings, listonly=listonly,
-				fetchonly=fetchonly, allow_missing_digests=True,
+				fetchonly=fetchonly, allow_missing_digests=False,
 				digests=dist_digests):
 				spawn_nofetch(mydbapi, myebuild, settings=mysettings,
 					fd_pipes=fd_pipes)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-20 17:39 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2015-12-20 17:39 UTC (permalink / raw
  To: gentoo-commits

commit:     a41c0f8b9081dad610e6e82ab57a5adce30789ae
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 08:04:55 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 17:38:49 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a41c0f8b

doebuild: Support finding lib* for ccache/distcc/icecc masquerade dir

Gentoo ccache used to historically swap between storing its masquerade
in 'lib' and $(get_libdir). To prevent breakage with any version of it,
and prevent future breakages when other tools change places randomly
try all three of $(get_libdir), 'lib' and 'libexec' looking for
masquerade dir and use the one that's found. Additionally, warn if there
is no masquerade dir.

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=567360
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index ff8958e..a4d4d9f 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -466,7 +466,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		icecream = "icecream" in mysettings.features
 
 		if ccache or distcc or icecream:
-			# Use default ABI libdir in accordance with bug #355283.
 			libdir = None
 			default_abi = mysettings.get("DEFAULT_ABI")
 			if default_abi:
@@ -474,17 +473,27 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 			if not libdir:
 				libdir = "lib"
 
+			# The installation locations use to vary between versions...
+			# Safer to look them up rather than assuming
+			possible_libexecdirs = (libdir, "lib", "libexec")
+			masquerades = []
 			if distcc:
-				mysettings["PATH"] = os.path.join(os.sep, eprefix_lstrip,
-					 "usr", libdir, "distcc", "bin") + ":" + mysettings["PATH"]
-
+				masquerades.append("distcc")
 			if icecream:
-				mysettings["PATH"] = os.path.join(os.sep, eprefix_lstrip,
-					"usr", 'libexec', "icecc", "bin") + ":" + mysettings["PATH"]
-
+				masquerades.append("icecc")
 			if ccache:
-				mysettings["PATH"] = os.path.join(os.sep, eprefix_lstrip,
-					 "usr", libdir, "ccache", "bin") + ":" + mysettings["PATH"]
+				masquerades.append("ccache")
+
+			for m in masquerades:
+				for l in possible_libexecdirs:
+					p = os.path.join(os.sep, eprefix_lstrip,
+							"usr", l, m, "bin")
+					if os.path.isdir(p):
+						mysettings["PATH"] = p + ":" + mysettings["PATH"]
+						break
+				else:
+					writemsg(("Warning: %s requested but no masquerade dir"
+						+ "can be found in /usr/lib*/%s/bin\n") % (m, m))
 
 		if 'MAKEOPTS' not in mysettings:
 			nproc = get_cpu_count()


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-13 21:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-12-13 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ee7978914f27c6a48cd1d6ee2667470aed25687f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 21:26:02 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 21:26:02 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee797891

config.__getitem__: fix blanket except clause to raise BaseException

Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.")

 pym/portage/package/ebuild/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 125d979..d45c2a0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2578,7 +2578,7 @@ class config(object):
 						f.write("=" * 8 + " Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ " + "=" * 8 + "\n")
 						f.writelines(stack)
 						f.write("=" * 96 + "\n")
-				except:
+				except Exception:
 					pass
 				raise
 			else:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-13 16:54 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-12-13 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     6ba56ad7be84b18dcbf15e8c6b283f5a9a559123
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 21:54:22 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 16:51:39 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6ba56ad7

config.environ: remove redundant check for nonexistent keys

Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.")

 pym/portage/package/ebuild/config.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index cc431fc..125d979 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2712,12 +2712,9 @@ class config(object):
 				filter_calling_env = True
 
 		environ_whitelist = self._environ_whitelist
-		for x in self:
+		for x, myvalue in self.iteritems():
 			if x in environ_filter:
 				continue
-			myvalue = self.get(x)
-			if myvalue is None:
-				continue
 			if not isinstance(myvalue, basestring):
 				writemsg(_("!!! Non-string value in config: %s=%s\n") % \
 					(x, myvalue), noiselevel=-1)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-09 12:37 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2015-12-09 12:37 UTC (permalink / raw
  To: gentoo-commits

commit:     31923f4ee2d89d840b3bc31af774352ef626648d
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Dec  9 12:35:04 2015 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
CommitDate: Wed Dec  9 12:35:04 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=31923f4e

portage.package.ebuild.config.config.__init__(): Skip some warnings for Portage Python scripts called in ebuild environment.

 pym/portage/package/ebuild/config.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 50e0110..f75a0e7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -510,12 +510,15 @@ class config(object):
 				if make_conf.get(var) is not None:
 					writemsg_level("!!! %s\n" % _("%s variable is set in make.conf but is no longer used. "
 						"Use repos.conf instead.") % var, level=logging.WARNING, noiselevel=-1)
-			for var in ("PORTDIR", "PORTDIR_OVERLAY", "SYNC"):
-				if self.configdict["env"].get(var) is not None:
-					writemsg_level("!!! %s\n" % _("%s environmental variable is set but is no longer used. "
-						"Use new environmental variables instead:") % var, level=logging.WARNING, noiselevel=-1)
-					writemsg_level("    PORTAGE_REPOSITORIES, PORTAGE_REPOSITORY:${repository_name}:${attribute}, "
-						"PORTAGE_ADDED_REPOSITORIES, PORTAGE_DELETED_REPOSITORIES\n", level=logging.WARNING, noiselevel=-1)
+			# Skip warnings for Portage Python scripts called in ebuild environment.
+			# PORTDIR is exported in ebuild environment in some EAPIs.
+			if self.configdict["env"].get("EBUILD") is None:
+				for var in ("PORTDIR", "PORTDIR_OVERLAY", "SYNC"):
+					if self.configdict["env"].get(var) is not None:
+						writemsg_level("!!! %s\n" % _("%s environmental variable is set but is no longer used. "
+							"Use new environmental variables instead:") % var, level=logging.WARNING, noiselevel=-1)
+						writemsg_level("    PORTAGE_REPOSITORIES, PORTAGE_REPOSITORY:${repository_name}:${attribute}, "
+							"PORTAGE_ADDED_REPOSITORIES, PORTAGE_DELETED_REPOSITORIES\n", level=logging.WARNING, noiselevel=-1)
 
 			self.lookuplist = [self.configdict["env"]]
 			if repositories is None:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-09  1:30 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-12-09  1:30 UTC (permalink / raw
  To: gentoo-commits

commit:     d8e8accc142cce05d558d841c92e6e0249445ebf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  9 01:26:34 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec  9 01:29:59 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d8e8accc

config: fix default USE_ORDER setting

This may fix the USE_ORDER KeyError that's been causing testFakedbapi
to fail for travis-ci.

 pym/portage/package/ebuild/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index b6217e7..975fe88 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -838,7 +838,8 @@ class config(object):
 			# reasonable defaults; this is important as without USE_ORDER,
 			# USE will always be "" (nothing set)!
 			if "USE_ORDER" not in self:
-				self.backupenv["USE_ORDER"] = "env:pkg:conf:defaults:pkginternal:repo:env.d"
+				self["USE_ORDER"] = "env:pkg:conf:defaults:pkginternal:repo:env.d"
+				self.backup_changes("USE_ORDER")
 
 			if "CBUILD" not in self and "CHOST" in self:
 				self["CBUILD"] = self["CHOST"]


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-12-01 17:56 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2015-12-01 17:56 UTC (permalink / raw
  To: gentoo-commits

commit:     528dc7cfa2856c1467759e81c99e35322fbffcce
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Dec  1 17:54:17 2015 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
CommitDate: Tue Dec  1 17:54:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=528dc7cf

portage.package.ebuild.fetch.fetch(): Clean setting of variables.

 pym/portage/package/ebuild/fetch.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 7e4e6fe..1be2800 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import print_function
@@ -987,10 +987,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 					}
 
 					for k in ("DISTDIR", "PORTAGE_SSH_OPTS"):
-						try:
-							variables[k] = mysettings[k]
-						except KeyError:
-							pass
+						v = mysettings.get(k)
+						if v is not None:
+							variables[k] = v
 
 					myfetch = shlex_split(locfetch)
 					myfetch = [varexpand(x, mydict=variables) for x in myfetch]


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-10-08  0:47 Brian Dolbec
  0 siblings, 0 replies; 191+ messages in thread
From: Brian Dolbec @ 2015-10-08  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     011a2815017039eb3db3f48dfe4144d581a3efdb
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 00:46:30 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 00:46:30 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=011a2815

doebuild.py: Remove unused imports and variables

Clean up pyflakes detected unused items.

 pym/portage/package/ebuild/doebuild.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 431a013..ff8958e 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -45,7 +45,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 	'portage.util.ExtractKernelVersion:ExtractKernelVersion'
 )
 
-from portage import auxdbkeys, bsd_chflags, \
+from portage import bsd_chflags, \
 	eapi_is_supported, merge, os, selinux, shutil, \
 	unmerge, _encodings, _os_merge, \
 	_shell_quote, _unicode_decode, _unicode_encode
@@ -69,7 +69,7 @@ from portage.localization import _
 from portage.output import colormap
 from portage.package.ebuild.prepare_build_dirs import prepare_build_dirs
 from portage.util import apply_recursive_permissions, \
-	apply_secpass_permissions, noiselimit, normalize_path, \
+	apply_secpass_permissions, noiselimit, \
 	writemsg, writemsg_stdout, write_atomic
 from portage.util.cpuinfo import get_cpu_count
 from portage.util.lafilefixer import rewrite_lafile
@@ -251,8 +251,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	EAPI metadata.
 	The myroot and use_cache parameters are unused.
 	"""
-	myroot = None
-	use_cache = None
 
 	if settings is None:
 		raise TypeError("settings argument is required")


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-04-21 23:52 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-04-21 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     130c01b9e561dd6ff7733a4905b21a0a921e9a22
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 19 19:24:52 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Apr 21 23:51:07 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=130c01b9

_doebuild_path: add fallback for temp PORTAGE_BIN_PATH (bug 547086)

X-Gentoo-Bug: 547086
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547086
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 1be83ad..4d926c7 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -195,7 +195,10 @@ def _doebuild_path(settings, eapi=None):
 
 	# Note: PORTAGE_BIN_PATH may differ from the global constant
 	# when portage is reinstalling itself.
-	portage_bin_path = settings["PORTAGE_BIN_PATH"]
+	portage_bin_path = [settings["PORTAGE_BIN_PATH"]]
+	if portage_bin_path[0] != portage.const.PORTAGE_BIN_PATH:
+		# Add a fallback path for restarting failed builds (bug 547086)
+		portage_bin_path.append(portage.const.PORTAGE_BIN_PATH)
 	eprefix = portage.const.EPREFIX
 	prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x]
 	rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
@@ -210,18 +213,22 @@ def _doebuild_path(settings, eapi=None):
 	path = overrides
 
 	if "xattr" in settings.features:
-		path.append(os.path.join(portage_bin_path, "ebuild-helpers", "xattr"))
+		for x in portage_bin_path:
+			path.append(os.path.join(x, "ebuild-helpers", "xattr"))
 
 	if uid != 0 and \
 		"unprivileged" in settings.features and \
 		"fakeroot" not in settings.features:
-		path.append(os.path.join(portage_bin_path,
-			"ebuild-helpers", "unprivileged"))
+		for x in portage_bin_path:
+			path.append(os.path.join(x,
+				"ebuild-helpers", "unprivileged"))
 
 	if settings.get("USERLAND", "GNU") != "GNU":
-		path.append(os.path.join(portage_bin_path, "ebuild-helpers", "bsd"))
+		for x in portage_bin_path:
+			path.append(os.path.join(x, "ebuild-helpers", "bsd"))
 
-	path.append(os.path.join(portage_bin_path, "ebuild-helpers"))
+	for x in portage_bin_path:
+		path.append(os.path.join(x, "ebuild-helpers"))
 	path.extend(prerootpath)
 
 	for prefix in prefixes:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-03-04 19:29 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-03-04 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     79782abdcd91d3ae9f6c3dbd49e8888668581699
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  4 18:53:57 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar  4 19:28:55 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=79782abd

Don't spawn socks5-server.py for pkg_nofetch (bug 542052)

Don't spawn socks5-server.py for pkg_nofetch, since the spawn_nofetch
function creates a private PORTAGE_TMPDIR.

X-Gentoo-Bug: 542052
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=542052
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/doebuild.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index a5970d5..94785b5 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1497,8 +1497,10 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 		keywords['unshare_net'] = not networked
 		keywords['unshare_ipc'] = not ipc
 
-		if not networked:
+		if not networked and mysettings.get("EBUILD_PHASE") != "nofetch":
 			# Provide a SOCKS5-over-UNIX-socket proxy to escape sandbox
+			# Don't do this for pkg_nofetch, since the spawn_nofetch
+			# function creates a private PORTAGE_TMPDIR.
 			try:
 				proxy = get_socks5_proxy(mysettings)
 			except NotImplementedError:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-03-03 21:26 git@oystercatcher mirror+tproxy
  0 siblings, 0 replies; 191+ messages in thread
From: git@oystercatcher mirror+tproxy @ 2015-03-03 21:26 UTC (permalink / raw
  To: gentoo-commits

commit:     20a48be6f4c6779e7d89aef2a64c008ec70dcc14
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  3 20:58:34 2015 +0000
Commit:     git@oystercatcher mirror+tproxy <git <AT> oystercatcher <DOT> gentoo <DOT> org>
CommitDate: Tue Mar  3 21:25:42 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=20a48be6

make.conf: expand PORTAGE_CONFIGROOT (bug 511806)

This can be useful for making settings, such as PKGDIR, relative
to PORTAGE_CONFIGROOT.

X-Gentoo-Bug: 511806
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511806
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 71fe4df..3c0018f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -394,6 +394,7 @@ class config(object):
 
 			# Allow make.globals to set default paths relative to ${EPREFIX}.
 			expand_map["EPREFIX"] = eprefix
+			expand_map["PORTAGE_CONFIGROOT"] = config_root
 
 			if portage._not_installed:
 				make_globals_path = os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals")


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-03-03 21:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2015-03-03 21:26 UTC (permalink / raw
  To: gentoo-commits

commit:     20a48be6f4c6779e7d89aef2a64c008ec70dcc14
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  3 20:58:34 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar  3 21:25:42 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=20a48be6

make.conf: expand PORTAGE_CONFIGROOT (bug 511806)

This can be useful for making settings, such as PKGDIR, relative
to PORTAGE_CONFIGROOT.

X-Gentoo-Bug: 511806
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511806
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/portage/package/ebuild/config.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 71fe4df..3c0018f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -394,6 +394,7 @@ class config(object):
 
 			# Allow make.globals to set default paths relative to ${EPREFIX}.
 			expand_map["EPREFIX"] = eprefix
+			expand_map["PORTAGE_CONFIGROOT"] = config_root
 
 			if portage._not_installed:
 				make_globals_path = os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals")


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-01-31 21:28 Michał Górny
  0 siblings, 0 replies; 191+ messages in thread
From: Michał Górny @ 2015-01-31 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     c284153bb84233cea1a0f22c41213e07d6cc578f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 25 11:42:02 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 31 21:27:36 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c284153b

Allow IPC & networking during pkg_config & pkg_info

---
 pym/portage/package/ebuild/doebuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 5dadb7f..f7561fe 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -85,7 +85,7 @@ _unsandboxed_phases = frozenset([
 
 # phases in which IPC with host is allowed
 _ipc_phases = frozenset([
-	"setup", "pretend",
+	"setup", "pretend", "config", "info",
 	"preinst", "postinst", "prerm", "postrm",
 ])
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-01-30 20:48 Brian Dolbec
  0 siblings, 0 replies; 191+ messages in thread
From: Brian Dolbec @ 2015-01-30 20:48 UTC (permalink / raw
  To: gentoo-commits

commit:     6c054da0c47119fa233f74139d72cdf9f19c1058
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 30 20:47:18 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 30 20:47:18 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6c054da0

portage/package/ebuild/doebuild.py: Change (nproc + 1) to (nproc)

 As pointed out in late review emails, nproc can sometimes outperform nproc + 1
Commit: 5a1e6c9710becab384b684ad6ba55e025d63a60e
Author: Michał Górny <mgorny <AT> gentoo.org> (Sat 17 Jan 2015 02:36:18 AM PST)
Subject: Default MAKEOPTS to -j(ncpus+1) when unset

---
 pym/portage/package/ebuild/doebuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 791b5c3..1ac5359 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -467,7 +467,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		if 'MAKEOPTS' not in mysettings:
 			nproc = get_cpu_count()
 			if nproc:
-				mysettings['MAKEOPTS'] = '-j%d' % (nproc + 1)
+				mysettings['MAKEOPTS'] = '-j%d' % (nproc)
 
 		if not eapi_exports_KV(eapi):
 			# Discard KV for EAPIs that don't support it. Cached KV is restored


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2015-01-30 20:48 Brian Dolbec
  0 siblings, 0 replies; 191+ messages in thread
From: Brian Dolbec @ 2015-01-30 20:48 UTC (permalink / raw
  To: gentoo-commits

commit:     4832730f65748f5b0ce15622f612621be38e8c07
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 30 20:48:05 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 30 20:48:05 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4832730f

portage/package/ebuild/doebuild.py: Whitespace cleanup

---
 pym/portage/package/ebuild/doebuild.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 1ac5359..5dadb7f 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -67,7 +67,7 @@ from portage.util import apply_recursive_permissions, \
 	apply_secpass_permissions, noiselimit, normalize_path, \
 	writemsg, writemsg_stdout, write_atomic
 from portage.util.cpuinfo import get_cpu_count
-from portage.util.lafilefixer import rewrite_lafile	
+from portage.util.lafilefixer import rewrite_lafile
 from portage.versions import _pkgsplit
 from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor
 from _emerge.EbuildBuildDir import EbuildBuildDir
@@ -501,7 +501,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 	"""
 	Wrapper function that invokes specific ebuild phases through the spawning
 	of ebuild.sh
-	
+
 	@param myebuild: name of the ebuild to invoke the phase on (CPV)
 	@type myebuild: String
 	@param mydo: Phase to run
@@ -544,13 +544,13 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 	@return:
 	1. 0 for success
 	2. 1 for error
-	
+
 	Most errors have an accompanying error message.
-	
+
 	listonly and fetchonly are only really necessary for operations involving 'fetch'
 	prev_mtimes are only necessary for merge operations.
 	Other variables may not be strictly required, many have defaults that are set inside of doebuild.
-	
+
 	"""
 
 	if settings is None:
@@ -572,8 +572,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 	if not tree:
 		writemsg("Warning: tree not specified to doebuild\n")
 		tree = "porttree"
-	
-	# chunked out deps for each phase, so that ebuild binary can use it 
+
+	# chunked out deps for each phase, so that ebuild binary can use it
 	# to collapse targets down.
 	actionmap_deps={
 	"pretend"  : [],
@@ -588,7 +588,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 	"package":["install"],
 	"merge"  :["install"],
 	}
-	
+
 	if mydbapi is None:
 		mydbapi = portage.db[myroot][tree].dbapi
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2014-12-10 20:24 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2014-12-10 20:24 UTC (permalink / raw
  To: gentoo-commits

commit:     280f10f3326af7a07ae383a127e3bea56b66bacb
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Dec 10 20:23:46 2014 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
CommitDate: Wed Dec 10 20:23:46 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=280f10f3

Sort PORTAGE_ARCHLIST.

---
 pym/portage/package/ebuild/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 59e239b..c5c727b 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -779,7 +779,7 @@ class config(object):
 
 			archlist = [grabfile(os.path.join(x, "arch.list")) \
 				for x in locations_manager.profile_and_user_locations]
-			archlist = stack_lists(archlist, incremental=1)
+			archlist = sorted(stack_lists(archlist, incremental=1))
 			self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist)
 
 			pkgprovidedlines = [grabfile(


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2014-11-05 19:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2014-11-05 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     7c9a9a45874816aa42c6667a18caa4655083e3b3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  5 06:32:24 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov  5 19:35:31 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7c9a9a45

doebuild: fix bug #528272

The doebuild function has a boolean "unpacked" variable which it sets
to True if it determines that the "unpack" phase has already executed
and the last modification times of the distfiles are older than the
last modification time of WORKDIR. The code which sets the "unpacked"
flag does not need to run unless the current phase is supposed to have
a build directory. Therefore, disable this code for all phases that are
not supposed to have a build directory. This fixes incorrect behavior
of the "fetch" phase as reported in bug #528272.

X-Gentoo-Bug: 528272
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528272
Acked-by: Alexander Berntsen <bernalex <AT> gentoo.org>

---
 pym/portage/package/ebuild/doebuild.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 544d193..6df3c69 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -829,7 +829,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		alist = set(mysettings.configdict["pkg"].get("A", "").split())
 
 		unpacked = False
-		if tree != "porttree":
+		if tree != "porttree" or \
+			mydo in _doebuild_commands_without_builddir:
 			pass
 		elif "unpack" not in phases_to_run:
 			unpacked = os.path.exists(os.path.join(


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2014-10-22 23:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2014-10-22 23:26 UTC (permalink / raw
  To: gentoo-commits

commit:     49896208f618817f83cfe9cd9a4a1afc87ac0f4a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  9 20:29:30 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 22 23:25:39 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=49896208

Remove g+w bit from $T for TPE bug #519566

Grant permissions to the portage user instead of the group, in order
to avoid TPE complaints about the g+w bit.

X-Gentoo-Bug: 519566
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=519566

---
 pym/portage/package/ebuild/doebuild.py           | 7 ++++---
 pym/portage/package/ebuild/prepare_build_dirs.py | 9 ++-------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 9516173..28d4f47 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1488,7 +1488,7 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 				"uid": portage_uid,
 				"gid": portage_gid,
 				"groups": userpriv_groups,
-				"umask": 0o02
+				"umask": 0o22
 			})
 
 			# Adjust pty ownership so that subprocesses
@@ -1646,8 +1646,9 @@ def _post_phase_userpriv_perms(mysettings):
 		""" Privileged phases may have left files that need to be made
 		writable to a less privileged user."""
 		apply_recursive_permissions(mysettings["T"],
-			uid=portage_uid, gid=portage_gid, dirmode=0o70, dirmask=0,
-			filemode=0o60, filemask=0)
+			uid=portage_uid, gid=portage_gid, dirmode=0o700, dirmask=0,
+			filemode=0o600, filemask=0)
+
 
 def _check_build_log(mysettings, out=None):
 	"""

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 6782160..ce54fdf 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -76,17 +76,12 @@ def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
 			ensure_dirs(mydir)
 			try:
 				apply_secpass_permissions(mydir,
-					gid=portage_gid, uid=portage_uid, mode=0o70, mask=0)
+					gid=portage_gid, uid=portage_uid, mode=0o700, mask=0)
 			except PortageException:
 				if not os.path.isdir(mydir):
 					raise
 		for dir_key in ("PORTAGE_BUILDDIR", "HOME", "PKG_LOGDIR", "T"):
-			"""These directories don't necessarily need to be group writable.
-			However, the setup phase is commonly run as a privileged user prior
-			to the other phases being run by an unprivileged user.  Currently,
-			we use the portage group to ensure that the unprivleged user still
-			has write access to these directories in any case."""
-			ensure_dirs(mysettings[dir_key], mode=0o775)
+			ensure_dirs(mysettings[dir_key], mode=0o755)
 			apply_secpass_permissions(mysettings[dir_key],
 				uid=portage_uid, gid=portage_gid)
 	except PermissionDenied as e:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2014-02-17 20:35 Sebastian Luther
  0 siblings, 0 replies; 191+ messages in thread
From: Sebastian Luther @ 2014-02-17 20:35 UTC (permalink / raw
  To: gentoo-commits

commit:     82187903f47e3deab8dbb578eb5cd54dad0fc04a
Author:     Sebastian Luther <SebastianLuther <AT> gmx <DOT> de>
AuthorDate: Sat Feb 15 12:34:10 2014 +0000
Commit:     Sebastian Luther <SebastianLuther <AT> gmx <DOT> de >
CommitDate: Mon Feb 17 20:30:00 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=82187903

Always warn about unknown mirrors (bug 501352)

---
 pym/portage/package/ebuild/fetch.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 5316f03..5984d82 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -445,8 +445,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 					filedict[myfile].extend(uris)
 					thirdpartymirror_uris.setdefault(myfile, []).extend(uris)
 
-				if not filedict[myfile]:
-					writemsg(_("No known mirror by the name: %s\n") % (mirrorname))
+				if mirrorname not in custommirrors and \
+					mirrorname not in thirdpartymirrors:
+					writemsg(_("!!! No known mirror by the name: %s\n") % (mirrorname))
 			else:
 				writemsg(_("Invalid mirror definition in SRC_URI:\n"), noiselevel=-1)
 				writemsg("  %s\n" % (myuri), noiselevel=-1)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-09-06 20:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-09-06 20:10 UTC (permalink / raw
  To: gentoo-commits

commit:     266cd3d17cdb8d3dacde171ac157c45f9fee3113
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  6 20:10:04 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep  6 20:10:04 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=266cd3d1

Adjust pty permissions for userpriv.

---
 pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 311f548..01707ae 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1488,6 +1488,25 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 				"groups": userpriv_groups,
 				"umask": 0o02
 			})
+
+			# Adjust pty ownership so that subprocesses
+			# can directly access /dev/fd/{1,2}.
+			stdout_fd = fd_pipes.get(1)
+			if stdout_fd is not None:
+				try:
+					subprocess_tty = _os.ttyname(stdout_fd)
+				except OSError:
+					pass
+				else:
+					try:
+						parent_tty = _os.ttyname(sys.__stdout__.fileno())
+					except OSError:
+						parent_tty = None
+
+					if subprocess_tty != parent_tty:
+						_os.chown(subprocess_tty,
+							int(portage_uid), int(portage_gid))
+
 		if "userpriv" in features and "userpriv" not in mysettings["PORTAGE_RESTRICT"].split() and secpass >= 2:
 			# Since Python 3.4, getpwuid and getgrgid
 			# require int type (no proxies).


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-08-22  3:57 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-08-22  3:57 UTC (permalink / raw
  To: gentoo-commits

commit:     6acaa421fbed2aa68ba0d576632f7e5fa8012205
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 03:57:10 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 03:57:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6acaa421

doebuild.spawn: make args backward compatible

Allow network and ipc by default, as before. Also, handle new FEATURES
logic inside _doebuild_spawn instead of doebuild.spawn, so that ipc and
networked arguments can be respected without need to consult FEATURES.

---
 pym/portage/package/ebuild/doebuild.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 2d26d2c..311f548 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -124,10 +124,11 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs):
 
 	if phase in _unsandboxed_phases:
 		kwargs['free'] = True
-	if phase in _ipc_phases:
-		kwargs['ipc'] = True
-	if phase in _networked_phases:
-		kwargs['networked'] = True
+
+	kwargs['ipc'] = 'ipc-sandbox' not in settings.features or \
+		phase in _ipc_phases
+	kwargs['networked'] = 'network-sandbox' not in settings.features or \
+		phase in _networked_phases
 
 	if phase == 'depend':
 		kwargs['droppriv'] = 'userpriv' in settings.features
@@ -1405,7 +1406,8 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
 
 # XXX This would be to replace getstatusoutput completely.
 # XXX Issue: cannot block execution. Deadlock condition.
-def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakeroot=0, networked=0, ipc=0, **keywords):
+def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
+	sesandbox=False, fakeroot=False, networked=True, ipc=True, **keywords):
 	"""
 	Spawn a subprocess with extra portage-specific options.
 	Optiosn include:
@@ -1469,10 +1471,8 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 
 	# Use Linux namespaces if available
 	if uid == 0 and platform.system() == 'Linux':
-		if not networked and "network-sandbox" in features:
-			keywords['unshare_net'] = True
-		if not ipc and "ipc-sandbox" in features:
-			keywords['unshare_ipc'] = True
+		keywords['unshare_net'] = not networked
+		keywords['unshare_ipc'] = not ipc
 
 	# TODO: Enable fakeroot to be used together with droppriv.  The
 	# fake ownership/permissions will have to be converted to real


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-08-06 20:02 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-08-06 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     2b8ed9524ba9815f3bcdd272fda2b938caee270c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  6 20:01:59 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug  6 20:01:59 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2b8ed952

thirdpartymirrors: use RepoConfig.prepos_order

This equivalent to, but more efficient than splitting PORTDIR_OVERLAY.

---
 pym/portage/package/ebuild/config.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 070a522..92e6c3f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2684,10 +2684,11 @@ class config(object):
 
 	def thirdpartymirrors(self):
 		if getattr(self, "_thirdpartymirrors", None) is None:
-			profileroots = [os.path.join(self["PORTDIR"], "profiles")]
-			for x in shlex_split(self.get("PORTDIR_OVERLAY", "")):
-				profileroots.insert(0, os.path.join(x, "profiles"))
-			thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots]
+			thirdparty_lists = []
+			for repo_name in reversed(self.repositories.prepos_order):
+				thirdparty_lists.append(grabdict(os.path.join(
+					self.repositories[repo_name].location,
+					"profiles", "thirdpartymirrors")))
 			self._thirdpartymirrors = stack_dictlist(thirdparty_lists, incremental=True)
 		return self._thirdpartymirrors
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-26 21:01 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-26 21:01 UTC (permalink / raw
  To: gentoo-commits

commit:     6bba024da3d349e0f73d0c5c8e802110c569eb7e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 26 21:01:17 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 21:01:17 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6bba024d

Support SYNC setting in make.conf.

This fixes commit 73188d23c68989539a913716bb8a4132d2c43316 so that it
works with make.conf.

---
 pym/portage/package/ebuild/config.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 619d072..070a522 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -491,6 +491,7 @@ class config(object):
 			known_repos = []
 			portdir = ""
 			portdir_overlay = ""
+			portdir_sync = None
 			for confs in [make_globals, make_conf, self.configdict["env"]]:
 				v = confs.get("PORTDIR")
 				if v is not None:
@@ -500,9 +501,15 @@ class config(object):
 				if v is not None:
 					portdir_overlay = v
 					known_repos.extend(shlex_split(v))
+				v = confs.get("SYNC")
+				if v is not None:
+					portdir_sync = v
+
 			known_repos = frozenset(known_repos)
 			self["PORTDIR"] = portdir
 			self["PORTDIR_OVERLAY"] = portdir_overlay
+			if portdir_sync:
+				self["SYNC"] = portdir_sync
 			self.lookuplist = [self.configdict["env"]]
 			if repositories is None:
 				self.repositories = load_repository_config(self)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-23 20:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-23 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     0af15e745a06714c29c213c04f7179cfafbf8b78
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 23 20:26:34 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jul 23 20:26:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0af15e74

getmaskingreason: handle UNKNOWN_REPO

---
 pym/portage/package/ebuild/getmaskingreason.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 5389574..70a6bf2 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -69,8 +69,9 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 	mycp = pkg.cp
 
 	locations = []
-	for repo in settings.repositories[pkg.repo].masters + (settings.repositories[pkg.repo],):
-		locations.append(os.path.join(repo.location, "profiles"))
+	if pkg.repo in settings.repositories:
+		for repo in settings.repositories[pkg.repo].masters + (settings.repositories[pkg.repo],):
+			locations.append(os.path.join(repo.location, "profiles"))
 	locations.extend(settings.profiles)
 	locations.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
 		USER_CONFIG_PATH))


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-23 20:09 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2013-07-23 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     82db881fdfbe8893cb84625a2e9783d154ae5910
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Jul 23 20:07:42 2013 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Tue Jul 23 20:07:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=82db881f

portage.package.ebuild.getmaskingreason.getmaskingreason(): Stop using PORTDIR and PORTDIR_OVERLAY.

---
 pym/portage/package/ebuild/getmaskingreason.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 1c16714..5389574 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -68,13 +68,10 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 
 	mycp = pkg.cp
 
-	# XXX- This is a temporary duplicate of code from the config constructor.
-	locations = [os.path.join(settings["PORTDIR"], "profiles")]
+	locations = []
+	for repo in settings.repositories[pkg.repo].masters + (settings.repositories[pkg.repo],):
+		locations.append(os.path.join(repo.location, "profiles"))
 	locations.extend(settings.profiles)
-	for ov in portage.util.shlex_split(settings["PORTDIR_OVERLAY"]):
-		profdir = os.path.join(normalize_path(ov), "profiles")
-		if os.path.isdir(profdir):
-			locations.append(profdir)
 	locations.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
 		USER_CONFIG_PATH))
 	locations.reverse()


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-14 18:13 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-14 18:13 UTC (permalink / raw
  To: gentoo-commits

commit:     fe87b237dfffe419e3f680049b7dea688bc8341a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 18:13:01 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 18:13:01 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fe87b237

config: add PORTDIR to expand_map

Since commit a5dd8b59fbf253a435e5ca32c5fd0d128d1d8cfb, there was no
longer a default PORTDIR setting when loading make.conf. Now, the
default main-repo location will serve as the default PORTDIR setting,
for backward compatibility.

---
 pym/portage/package/ebuild/config.py | 61 ++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 501ccdd..39a6096 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -509,6 +509,37 @@ class config(object):
 			else:
 				self.repositories = repositories
 
+			#filling PORTDIR and PORTDIR_OVERLAY variable for compatibility
+			main_repo = self.repositories.mainRepo()
+			if main_repo is not None:
+				self["PORTDIR"] = main_repo.user_location
+				self.backup_changes("PORTDIR")
+				expand_map["PORTDIR"] = self["PORTDIR"]
+
+			# repoman controls PORTDIR_OVERLAY via the environment, so no
+			# special cases are needed here.
+			portdir_overlay = list(self.repositories.repoUserLocationList())
+			if portdir_overlay and portdir_overlay[0] == self["PORTDIR"]:
+				portdir_overlay = portdir_overlay[1:]
+
+			new_ov = []
+			if portdir_overlay:
+				shell_quote_re = re.compile(r"[\s\\\"'$`]")
+				for ov in portdir_overlay:
+					ov = normalize_path(ov)
+					if isdir_raise_eaccess(ov):
+						if shell_quote_re.search(ov) is not None:
+							ov = portage._shell_quote(ov)
+						new_ov.append(ov)
+					else:
+						writemsg(_("!!! Invalid PORTDIR_OVERLAY"
+							" (not a dir): '%s'\n") % ov, noiselevel=-1)
+
+			self["PORTDIR_OVERLAY"] = " ".join(new_ov)
+			self.backup_changes("PORTDIR_OVERLAY")
+			expand_map["PORTDIR_OVERLAY"] = self["PORTDIR_OVERLAY"]
+
+			locations_manager.set_port_dirs(self["PORTDIR"], self["PORTDIR_OVERLAY"])
 			locations_manager.load_profiles(self.repositories, known_repos)
 
 			profiles_complex = locations_manager.profiles_complex
@@ -615,36 +646,6 @@ class config(object):
 			self._paccept_restrict = portage.dep.ExtendedAtomDict(dict)
 			self._penvdict = portage.dep.ExtendedAtomDict(dict)
 
-			#filling PORTDIR and PORTDIR_OVERLAY variable for compatibility
-			main_repo = self.repositories.mainRepo()
-			if main_repo is not None:
-				self["PORTDIR"] = main_repo.user_location
-				self.backup_changes("PORTDIR")
-
-			# repoman controls PORTDIR_OVERLAY via the environment, so no
-			# special cases are needed here.
-			portdir_overlay = list(self.repositories.repoUserLocationList())
-			if portdir_overlay and portdir_overlay[0] == self["PORTDIR"]:
-				portdir_overlay = portdir_overlay[1:]
-
-			new_ov = []
-			if portdir_overlay:
-				shell_quote_re = re.compile(r"[\s\\\"'$`]")
-				for ov in portdir_overlay:
-					ov = normalize_path(ov)
-					if isdir_raise_eaccess(ov):
-						if shell_quote_re.search(ov) is not None:
-							ov = portage._shell_quote(ov)
-						new_ov.append(ov)
-					else:
-						writemsg(_("!!! Invalid PORTDIR_OVERLAY"
-							" (not a dir): '%s'\n") % ov, noiselevel=-1)
-
-			self["PORTDIR_OVERLAY"] = " ".join(new_ov)
-			self.backup_changes("PORTDIR_OVERLAY")
-
-			locations_manager.set_port_dirs(self["PORTDIR"], self["PORTDIR_OVERLAY"])
-
 			self._repo_make_defaults = {}
 			for repo in self.repositories.repos_with_profiles():
 				d = getconfig(os.path.join(repo.location, "profiles", "make.defaults"),


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-07 19:34 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-07 19:34 UTC (permalink / raw
  To: gentoo-commits

commit:     82989f9c8aecadd3e7741850752a3a45f62c6b84
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  7 19:34:34 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul  7 19:34:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=82989f9c

doebuild: handle tmpdir / returnpid interaction

---
 pym/portage/package/ebuild/doebuild.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 1d44b93..edf3df6 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -762,9 +762,9 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			if "noauto" in mysettings.features:
 				mysettings.features.discard("noauto")
 
-		# The info phase is special because it uses mkdtemp so and
-		# user (not necessarily in the portage group) can run it.
-		if mydo not in ('info',) and \
+		# If we are not using a private temp dir, then check access
+		# to the global temp dir.
+		if tmpdir is None and \
 			mydo not in _doebuild_commands_without_builddir:
 			rval = _check_temp_dir(mysettings)
 			if rval != os.EX_OK:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-06 22:06 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-06 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     30c655321dbb75b97348aa1f28f9049237592079
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  6 22:06:28 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jul  6 22:06:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=30c65532

doebuild: deprecate returnpid

This case is not supported, since it bypasses the EbuildPhase class
which implements important functionality (including post phase hooks
and IPC for things like best/has_version and die).

---
 pym/portage/package/ebuild/doebuild.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 8444e19..23ca238 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -583,6 +583,15 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		writemsg("\n", noiselevel=-1)
 		return 1
 
+	if returnpid and mydo != 'depend':
+		# This case is not supported, since it bypasses the EbuildPhase class
+		# which implements important functionality (including post phase hooks
+		# and IPC for things like best/has_version and die).
+		warnings.warn("portage.doebuild() called "
+			"with returnpid parameter enabled. This usage will "
+			"not be supported in the future.",
+			DeprecationWarning, stacklevel=2)
+
 	if mydo == "fetchall":
 		fetchall = 1
 		mydo = "fetch"
@@ -1507,6 +1516,12 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
 	logfile=None, fd_pipes=None, returnpid=False):
 
+	if returnpid:
+		warnings.warn("portage.spawnebuild() called "
+			"with returnpid parameter enabled. This usage will "
+			"not be supported in the future.",
+			DeprecationWarning, stacklevel=2)
+
 	if not returnpid and \
 		(alwaysdep or "noauto" not in mysettings.features):
 		# process dependency first


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-07-06  1:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-07-06  1:41 UTC (permalink / raw
  To: gentoo-commits

commit:     1ac7623f580711d26a2b8e72547f2e6b5800b88e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  6 01:41:01 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jul  6 01:41:01 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1ac7623f

doebuild: cleanup returnpid support, bug #475812

The returnpid parameter is no longer deprecated, since it's useful for
API consumers that wish to use the fd_pipes parameter (the fd_pipes
parameter is only respected when returnpid is True).

---
 pym/portage/package/ebuild/doebuild.py | 57 ++++++++++++++++++++--------------
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 6901719..8444e19 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -499,7 +499,9 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 	@param prev_mtimes: A dict of { filename:mtime } keys used by merge() to do config_protection
 	@type prev_mtimes: dictionary
 	@param fd_pipes: A dict of mapping for pipes, { '0': stdin, '1': stdout }
-		for example.
+		for example. This is parameter only guaranteed to be respected when
+		returnpid is True (otherwise all subprocesses simply inherit file
+		descriptors from sys.__std* streams).
 	@type fd_pipes: Dictionary
 	@param returnpid: Return a list of process IDs for a successful spawn, or
 		an integer value if spawn is unsuccessful. NOTE: This requires the
@@ -581,12 +583,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		writemsg("\n", noiselevel=-1)
 		return 1
 
-	if returnpid and mydo != 'depend':
-		warnings.warn("portage.doebuild() called " + \
-			"with returnpid parameter enabled. This usage will " + \
-			"not be supported in the future.",
-			DeprecationWarning, stacklevel=2)
-
 	if mydo == "fetchall":
 		fetchall = 1
 		mydo = "fetch"
@@ -697,7 +693,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		# we can temporarily override PORTAGE_TMPDIR with a random temp dir
 		# so that there's no need for locking and it can be used even if the
 		# user isn't in the portage group.
-		if mydo in ("info",):
+		if not returnpid and mydo in ("info",):
 			tmpdir = tempfile.mkdtemp()
 			tmpdir_orig = mysettings["PORTAGE_TMPDIR"]
 			mysettings["PORTAGE_TMPDIR"] = tmpdir
@@ -736,14 +732,15 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			return _spawn_phase(mydo, mysettings,
 				fd_pipes=fd_pipes, returnpid=returnpid)
 
-		# Validate dependency metadata here to ensure that ebuilds with invalid
-		# data are never installed via the ebuild command. Don't bother when
-		# returnpid == True since there's no need to do this every time emerge
-		# executes a phase.
 		if tree == "porttree":
-			rval = _validate_deps(mysettings, myroot, mydo, mydbapi)
-			if rval != os.EX_OK:
-				return rval
+
+			if not returnpid:
+				# Validate dependency metadata here to ensure that ebuilds with
+				# invalid data are never installed via the ebuild command. Skip
+				# this when returnpid is True (assume the caller handled it).
+				rval = _validate_deps(mysettings, myroot, mydo, mydbapi)
+				if rval != os.EX_OK:
+					return rval
 
 		else:
 			# FEATURES=noauto only makes sense for porttree, and we don't want
@@ -761,11 +758,16 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 				return rval
 
 		if mydo == "unmerge":
+			if returnpid:
+				writemsg("!!! doebuild: %s\n" %
+					_("returnpid is not supported for phase '%s'\n" % mydo),
+					noiselevel=-1)
 			return unmerge(mysettings["CATEGORY"],
 				mysettings["PF"], myroot, mysettings, vartree=vartree)
 
 		phases_to_run = set()
-		if "noauto" in mysettings.features or \
+		if returnpid or \
+			"noauto" in mysettings.features or \
 			mydo not in actionmap_deps:
 			phases_to_run.add(mydo)
 		else:
@@ -1013,7 +1015,9 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			if len(actionmap_deps.get(x, [])):
 				actionmap[x]["dep"] = ' '.join(actionmap_deps[x])
 
-		if mydo in actionmap:
+		regular_actionmap_phase = mydo in actionmap
+
+		if regular_actionmap_phase:
 			bintree = None
 			if mydo == "package":
 				# Make sure the package directory exists before executing
@@ -1037,6 +1041,9 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 				actionmap, mysettings, debug, logfile=logfile,
 				fd_pipes=fd_pipes, returnpid=returnpid)
 
+			if returnpid and isinstance(retval, list):
+				return retval
+
 			if retval == os.EX_OK:
 				if mydo == "package" and bintree is not None:
 					bintree.inject(mysettings.mycpv,
@@ -1048,7 +1055,15 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 					except OSError:
 						pass
 
-		elif mydo=="qmerge":
+		elif returnpid:
+			writemsg("!!! doebuild: %s\n" %
+				_("returnpid is not supported for phase '%s'\n" % mydo),
+				noiselevel=-1)
+
+		if regular_actionmap_phase:
+			# handled above
+			pass
+		elif mydo == "qmerge":
 			# check to ensure install was run.  this *only* pops up when users
 			# forget it and are using ebuild
 			if not os.path.exists(
@@ -1492,12 +1507,6 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
 	logfile=None, fd_pipes=None, returnpid=False):
 
-	if returnpid:
-		warnings.warn("portage.spawnebuild() called " + \
-			"with returnpid parameter enabled. This usage will " + \
-			"not be supported in the future.",
-			DeprecationWarning, stacklevel=2)
-
 	if not returnpid and \
 		(alwaysdep or "noauto" not in mysettings.features):
 		# process dependency first


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-06-24 20:01 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2013-06-24 20:01 UTC (permalink / raw
  To: gentoo-commits

commit:     3e47214511f3cb9f01ec7d2aa3ed07f4049bcf3c
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Jun 24 20:00:15 2013 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Mon Jun 24 20:00:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3e472145

portage.package.ebuild.config.config(): Add repositories parametre.

---
 pym/portage/package/ebuild/config.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index befdee2..501ccdd 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -169,7 +169,7 @@ class config(object):
 	def __init__(self, clone=None, mycpv=None, config_profile_path=None,
 		config_incrementals=None, config_root=None, target_root=None,
 		eprefix=None, local_config=True, env=None,
-		_unmatched_removal=False):
+		_unmatched_removal=False, repositories=None):
 		"""
 		@param clone: If provided, init will use deepcopy to copy by value the instance.
 		@type clone: Instance of config class.
@@ -197,6 +197,9 @@ class config(object):
 		@param _unmatched_removal: Enabled by repoman when the
 			--unmatched-removal option is given.
 		@type _unmatched_removal: Boolean
+		@param repositories: Configuration of repositories.
+			Defaults to portage.repository.config.load_repository_config().
+		@type repositories: Instance of portage.repository.config.RepoConfigLoader class.
 		"""
 
 		# This is important when config is reloaded after emerge --sync.
@@ -501,7 +504,10 @@ class config(object):
 			self["PORTDIR"] = portdir
 			self["PORTDIR_OVERLAY"] = portdir_overlay
 			self.lookuplist = [self.configdict["env"]]
-			self.repositories = load_repository_config(self)
+			if repositories is None:
+				self.repositories = load_repository_config(self)
+			else:
+				self.repositories = repositories
 
 			locations_manager.load_profiles(self.repositories, known_repos)
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-05-18 11:34 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-05-18 11:34 UTC (permalink / raw
  To: gentoo-commits

commit:     a40bb0e8bf595d5f014b80b19d14ba52801f84bc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 18 11:34:01 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat May 18 11:34:01 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a40bb0e8

doebuild: fix emerge --fetchonly FEATURES=digest

This removes obsolete parallel-fetch code which is no longer needed,
since EbuildFetcher no longer calls doebuild.

---
 pym/portage/package/ebuild/doebuild.py |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 8c26523..6de47bb 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -588,9 +588,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		fetchall = 1
 		mydo = "fetch"
 
-	parallel_fetchonly = mydo in ("fetch", "fetchall") and \
-		"PORTAGE_PARALLEL_FETCHONLY" in mysettings
-
 	if mydo not in clean_phases and not os.path.exists(myebuild):
 		writemsg("!!! doebuild: %s not found for %s\n" % (myebuild, mydo),
 			noiselevel=-1)
@@ -837,8 +834,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 		# in order to satisfy the sane $PWD requirement (from bug #239560)
 		# when pkg_nofetch is spawned.
 		have_build_dirs = False
-		if not parallel_fetchonly and \
-			mydo not in ('digest', 'fetch', 'help', 'manifest'):
+		if mydo not in ('digest', 'fetch', 'help', 'manifest'):
 			if not returnpid and \
 				'PORTAGE_BUILDDIR_LOCKED' not in mysettings:
 				builddir_lock = EbuildBuildDir(
@@ -979,11 +975,7 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 				mf = None
 				_doebuild_manifest_cache = None
 				return not digestgen(mysettings=mysettings, myportdb=mydbapi)
-			elif mydo != 'fetch' and \
-				"digest" in mysettings.features:
-				# Don't do this when called by emerge or when called just
-				# for fetch (especially parallel-fetch) since it's not needed
-				# and it can interfere with parallel tasks.
+			elif "digest" in mysettings.features:
 				mf = None
 				_doebuild_manifest_cache = None
 				digestgen(mysettings=mysettings, myportdb=mydbapi)
@@ -992,14 +984,17 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
 			if mydo in ("digest", "manifest"):
 				return 1
 
+		if mydo == "fetch":
+			# Return after digestgen for FEATURES=digest support.
+			# Return before digestcheck, since fetch() already
+			# checked any relevant digests.
+			return 0
+
 		# See above comment about fetching only when needed
 		if tree == 'porttree' and \
 			not digestcheck(checkme, mysettings, "strict" in features, mf=mf):
 			return 1
 
-		if mydo == "fetch":
-			return 0
-
 		# remove PORTAGE_ACTUAL_DISTDIR once cvs/svn is supported via SRC_URI
 		if tree == 'porttree' and \
 			((mydo != "setup" and "noauto" not in features) \


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-05-03  2:21 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-05-03  2:21 UTC (permalink / raw
  To: gentoo-commits

commit:     9072a3862dae6d047fdc7b4fc81ac21f539037c5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May  3 02:21:16 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May  3 02:21:16 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9072a386

_getMissingProperties: remove || support

PROPERTIES is not allowed to contain ||, according to PMS.

---
 pym/portage/package/ebuild/config.py |   37 +--------------------------------
 1 files changed, 2 insertions(+), 35 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f6049de..96c1734 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1950,7 +1950,6 @@ class config(object):
 
 		properties_str = metadata.get("PROPERTIES", "")
 		properties = set(use_reduce(properties_str, matchall=1, flat=True))
-		properties.discard('||')
 
 		acceptable_properties = set()
 		for x in accept_properties:
@@ -1968,40 +1967,8 @@ class config(object):
 		else:
 			use = []
 
-		properties_struct = use_reduce(properties_str, uselist=use, opconvert=True)
-		return self._getMaskedProperties(properties_struct, acceptable_properties)
-
-	def _getMaskedProperties(self, properties_struct, acceptable_properties):
-		if not properties_struct:
-			return []
-		if properties_struct[0] == "||":
-			ret = []
-			for element in properties_struct[1:]:
-				if isinstance(element, list):
-					if element:
-						tmp = self._getMaskedProperties(
-							element, acceptable_properties)
-						if not tmp:
-							return []
-						ret.extend(tmp)
-				else:
-					if element in acceptable_properties:
-						return[]
-					ret.append(element)
-			# Return all masked properties, since we don't know which combination
-			# (if any) the user will decide to unmask
-			return ret
-
-		ret = []
-		for element in properties_struct:
-			if isinstance(element, list):
-				if element:
-					ret.extend(self._getMaskedProperties(element,
-						acceptable_properties))
-			else:
-				if element not in acceptable_properties:
-					ret.append(element)
-		return ret
+		return [x for x in use_reduce(properties_str, uselist=use, flat=True)
+			if x not in acceptable_properties]
 
 	def _accept_chost(self, cpv, metadata):
 		"""


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-05-03  1:52 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-05-03  1:52 UTC (permalink / raw
  To: gentoo-commits

commit:     18aa5cc076a5597ba7e256f316835606bb5b6df9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May  3 01:52:23 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May  3 01:52:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=18aa5cc0

Silence embedded profile warning for bug #467142.

---
 pym/portage/package/ebuild/config.py |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 227d3a8..f6049de 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1011,11 +1011,21 @@ class config(object):
 					writemsg(_("!!! INVALID ACCEPT_KEYWORDS: %s\n") % str(group),
 						noiselevel=-1)
 
-		profile_broken = not self.profile_path or \
-			not exists_raise_eaccess(os.path.join(self.profile_path, "parent")) and \
-			exists_raise_eaccess(os.path.join(self["PORTDIR"], "profiles"))
+		profile_broken = False
 
-		if profile_broken:
+		if not self.profile_path:
+			profile_broken = True
+		else:
+			# If any one of these files exists, then
+			# the profile is considered valid.
+			for x in ("make.defaults", "parent",
+				"packages", "use.force", "use.mask"):
+				if exists_raise_eaccess(os.path.join(self.profile_path, x)):
+					break
+			else:
+				profile_broken = True
+
+		if profile_broken and not portage._sync_disabled_warnings:
 			abs_profile_path = None
 			for x in (PROFILE_PATH, 'etc/make.profile'):
 				x = os.path.join(self["PORTAGE_CONFIGROOT"], x)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-03-27 15:21 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-03-27 15:21 UTC (permalink / raw
  To: gentoo-commits

commit:     d35ef931fb1152cee0d75815ef21c896c732a66c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 15:21:12 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 15:21:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d35ef931

make.defaults: profile-formats control recursive

---
 pym/portage/package/ebuild/config.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 318bb3d..227d3a8 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -522,10 +522,10 @@ class config(object):
 			self.unpack_dependencies = load_unpack_dependencies_configuration(self.repositories)
 
 			mygcfg = {}
-			if self.profiles:
-				mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"),
-					tolerant=tolerant, expand=expand_map, recursive=True)
-					for x in self.profiles]
+			if profiles_complex:
+				mygcfg_dlists = [getconfig(os.path.join(x.location, "make.defaults"),
+					tolerant=tolerant, expand=expand_map, recursive=x.portage1_directories)
+					for x in profiles_complex]
 				self._make_defaults = mygcfg_dlists
 				mygcfg = stack_dicts(mygcfg_dlists,
 					incrementals=self.incrementals)
@@ -638,7 +638,7 @@ class config(object):
 			self._repo_make_defaults = {}
 			for repo in self.repositories.repos_with_profiles():
 				d = getconfig(os.path.join(repo.location, "profiles", "make.defaults"),
-					tolerant=tolerant, expand=self.configdict["globals"].copy(), recursive=True) or {}
+					tolerant=tolerant, expand=self.configdict["globals"].copy(), recursive=repo.portage1_profiles) or {}
 				if d:
 					for k in chain(self._env_blacklist,
 						profile_only_variables, self._global_only_vars):


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-03-27  4:15 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-03-27  4:15 UTC (permalink / raw
  To: gentoo-commits

commit:     90f0df42d8888d598e4a2f5cc891b2fcbef2f500
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 04:15:25 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 04:15:25 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=90f0df42

make.defaults: recurse directories

This makes behavior more consistent with handling of other files, as
discussed in bug #463266.

---
 pym/portage/package/ebuild/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1d2e4a6..318bb3d 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -524,7 +524,7 @@ class config(object):
 			mygcfg = {}
 			if self.profiles:
 				mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"),
-					tolerant=tolerant, expand=expand_map)
+					tolerant=tolerant, expand=expand_map, recursive=True)
 					for x in self.profiles]
 				self._make_defaults = mygcfg_dlists
 				mygcfg = stack_dicts(mygcfg_dlists,
@@ -638,7 +638,7 @@ class config(object):
 			self._repo_make_defaults = {}
 			for repo in self.repositories.repos_with_profiles():
 				d = getconfig(os.path.join(repo.location, "profiles", "make.defaults"),
-					tolerant=tolerant, expand=self.configdict["globals"].copy()) or {}
+					tolerant=tolerant, expand=self.configdict["globals"].copy(), recursive=True) or {}
 				if d:
 					for k in chain(self._env_blacklist,
 						profile_only_variables, self._global_only_vars):


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-02-27  0:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-02-27  0:27 UTC (permalink / raw
  To: gentoo-commits

commit:     207554dd7d2796f1fa4da41725154d17048a194d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 27 00:27:40 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb 27 00:27:40 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=207554dd

config: unset LINGUAS if appropriate, bug #459350

---
 pym/portage/package/ebuild/config.py |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index fb7b741..2ac59f0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1183,8 +1183,11 @@ class config(object):
 		the previously calculated USE settings.
 		"""
 
-		def __init__(self, use, usemask, iuse_implicit,
+		def __init__(self, settings, unfiltered_use,
+			use, usemask, iuse_implicit,
 			use_expand_split, use_expand_dict):
+			self._settings = settings
+			self._unfiltered_use = unfiltered_use
 			self._use = use
 			self._usemask = usemask
 			self._iuse_implicit = iuse_implicit
@@ -1239,13 +1242,32 @@ class config(object):
 				# Don't export empty USE_EXPAND vars unless the user config
 				# exports them as empty.  This is required for vars such as
 				# LINGUAS, where unset and empty have different meanings.
+				# The special '*' token is understood by ebuild.sh, which
+				# will unset the variable so that things like LINGUAS work
+				# properly (see bug #459350).
 				if has_wildcard:
-					# ebuild.sh will see this and unset the variable so
-					# that things like LINGUAS work properly
 					value = '*'
 				else:
 					if has_iuse:
-						value = ''
+						already_set = False
+						# Skip the first 'env' configdict, in order to
+						# avoid infinite recursion here, since that dict's
+						# __getitem__ calls the current __getitem__.
+						for d in self._settings.lookuplist[1:]:
+							if key in d:
+								already_set = True
+								break
+
+						if not already_set:
+							for x in self._unfiltered_use:
+								if x[:prefix_len] == prefix:
+									already_set = True
+									break
+
+						if already_set:
+							value = ''
+						else:
+							value = '*'
 					else:
 						# It's not in IUSE, so just allow the variable content
 						# to pass through if it is defined somewhere.  This
@@ -1501,6 +1523,7 @@ class config(object):
 		# be done for every setcpv() call since practically every
 		# package has different IUSE.
 		use = set(self["USE"].split())
+		unfiltered_use = frozenset(use)
 		if explicit_iuse is None:
 			explicit_iuse = frozenset(x.lstrip("+-") for x in iuse.split())
 
@@ -1585,7 +1608,8 @@ class config(object):
 		# comparison instead of startswith().
 		use_expand_split = set(x.lower() for \
 			x in self.get('USE_EXPAND', '').split())
-		lazy_use_expand = self._lazy_use_expand(use, self.usemask,
+		lazy_use_expand = self._lazy_use_expand(
+			self, unfiltered_use, use, self.usemask,
 			portage_iuse, use_expand_split, self._use_expand_dict)
 
 		use_expand_iuses = {}


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-02-18  2:09 Mike Frysinger
  0 siblings, 0 replies; 191+ messages in thread
From: Mike Frysinger @ 2013-02-18  2:09 UTC (permalink / raw
  To: gentoo-commits

commit:     0498d4d3e96bb99c25721bbd609bfbb7ef59d585
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 18 02:07:40 2013 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Feb 18 02:08:26 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0498d4d3

ebuild: delete useless indent

Should be no functional change here.  The code was indented one too many
times, and the if check is pointless -- the for loop will already skip
if there are no elements in the list.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 pym/portage/package/ebuild/digestgen.py |  107 +++++++++++++++----------------
 1 files changed, 52 insertions(+), 55 deletions(-)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 6ad3397..95d02db 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -112,67 +112,64 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					missing_files.append(myfile)
 					continue
 
-		if missing_files:
-				for myfile in missing_files:
-					uris = set()
-					all_restrict = set()
-					for cpv in distfiles_map[myfile]:
-						uris.update(myportdb.getFetchMap(
-							cpv, mytree=mytree)[myfile])
-						restrict = myportdb.aux_get(cpv, ['RESTRICT'],
-							mytree=mytree)[0]
-						# Here we ignore conditional parts of RESTRICT since
-						# they don't apply unconditionally. Assume such
-						# conditionals only apply on the client side where
-						# digestgen() does not need to be called.
-						all_restrict.update(use_reduce(restrict,
-							flat=True, matchnone=True))
-
-						# fetch() uses CATEGORY and PF to display a message
-						# when fetch restriction is triggered.
-						cat, pf = catsplit(cpv)
-						mysettings["CATEGORY"] = cat
-						mysettings["PF"] = pf
-
-					# fetch() uses PORTAGE_RESTRICT to control fetch
-					# restriction, which is only applied to files that
-					# are not fetchable via a mirror:// URI.
-					mysettings["PORTAGE_RESTRICT"] = " ".join(all_restrict)
-
-					try:
-						st = os.stat(os.path.join(
-							mysettings["DISTDIR"],myfile))
-					except OSError:
-						st = None
-
-					if not fetch({myfile : uris}, mysettings):
-						myebuild = os.path.join(mysettings["O"],
-							catsplit(cpv)[1] + ".ebuild")
-						spawn_nofetch(myportdb, myebuild)
-						writemsg(_("!!! Fetch failed for %s, can't update "
-							"Manifest\n") % myfile, noiselevel=-1)
-						if myfile in dist_hashes and \
-							st is not None and st.st_size > 0:
-							# stat result is obtained before calling fetch(),
-							# since fetch may rename the existing file if the
-							# digest does not match.
-							writemsg(_("!!! If you would like to "
-								"forcefully replace the existing "
-								"Manifest entry\n!!! for %s, use "
-								"the following command:\n") % myfile + \
-								"!!!    " + colorize("INFORM",
-								"ebuild --force %s manifest" % \
-								os.path.basename(myebuild)) + "\n",
-								noiselevel=-1)
-						return 0
+		for myfile in missing_files:
+			uris = set()
+			all_restrict = set()
+			for cpv in distfiles_map[myfile]:
+				uris.update(myportdb.getFetchMap(
+					cpv, mytree=mytree)[myfile])
+				restrict = myportdb.aux_get(cpv, ['RESTRICT'], mytree=mytree)[0]
+				# Here we ignore conditional parts of RESTRICT since
+				# they don't apply unconditionally. Assume such
+				# conditionals only apply on the client side where
+				# digestgen() does not need to be called.
+				all_restrict.update(use_reduce(restrict,
+					flat=True, matchnone=True))
+
+				# fetch() uses CATEGORY and PF to display a message
+				# when fetch restriction is triggered.
+				cat, pf = catsplit(cpv)
+				mysettings["CATEGORY"] = cat
+				mysettings["PF"] = pf
+
+			# fetch() uses PORTAGE_RESTRICT to control fetch
+			# restriction, which is only applied to files that
+			# are not fetchable via a mirror:// URI.
+			mysettings["PORTAGE_RESTRICT"] = " ".join(all_restrict)
+
+			try:
+				st = os.stat(os.path.join(mysettings["DISTDIR"], myfile))
+			except OSError:
+				st = None
+
+			if not fetch({myfile : uris}, mysettings):
+				myebuild = os.path.join(mysettings["O"],
+					catsplit(cpv)[1] + ".ebuild")
+				spawn_nofetch(myportdb, myebuild)
+				writemsg(_("!!! Fetch failed for %s, can't update Manifest\n")
+					% myfile, noiselevel=-1)
+				if myfile in dist_hashes and \
+					st is not None and st.st_size > 0:
+					# stat result is obtained before calling fetch(),
+					# since fetch may rename the existing file if the
+					# digest does not match.
+					cmd = colorize("INFORM", "ebuild --force %s manifest" %
+						os.path.basename(myebuild))
+					writemsg((_(
+						"!!! If you would like to forcefully replace the existing Manifest entry\n"
+						"!!! for %s, use the following command:\n") % myfile) +
+						"!!!    %s\n" % cmd,
+						noiselevel=-1)
+				return 0
+
 		writemsg_stdout(_(">>> Creating Manifest for %s\n") % mysettings["O"])
 		try:
 			mf.create(assumeDistHashesSometimes=True,
 				assumeDistHashesAlways=(
 				"assume-digests" in mysettings.features))
 		except FileNotFound as e:
-			writemsg(_("!!! File %s doesn't exist, can't update "
-				"Manifest\n") % e, noiselevel=-1)
+			writemsg(_("!!! File %s doesn't exist, can't update Manifest\n")
+				% e, noiselevel=-1)
 			return 0
 		except PortagePackageException as e:
 			writemsg(("!!! %s\n") % (e,), noiselevel=-1)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-02-11 15:29 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-02-11 15:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2df35bf46b7fa144272e37d055825f70b46eb0ce
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 11 15:28:50 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 11 15:28:50 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2df35bf4

deprecated_profile_check: show eselect command

---
 .../package/ebuild/deprecated_profile_check.py     |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/deprecated_profile_check.py b/pym/portage/package/ebuild/deprecated_profile_check.py
index 2621ce7..fdb19b4 100644
--- a/pym/portage/package/ebuild/deprecated_profile_check.py
+++ b/pym/portage/package/ebuild/deprecated_profile_check.py
@@ -47,15 +47,19 @@ def deprecated_profile_check(settings=None):
 		writemsg(colorize("BAD", _("!!! Please refer to the "
 			"Gentoo Upgrading Guide.")) + "\n", noiselevel=-1)
 		return True
-	newprofile = dcontent[0]
+	newprofile = dcontent[0].rstrip("\n")
 	writemsg(colorize("BAD", _("!!! Please upgrade to the "
-		"following profile if possible:")) + "\n", noiselevel=-1)
-	writemsg(8*" " + colorize("GOOD", newprofile) + "\n", noiselevel=-1)
+		"following profile if possible:")) + "\n\n", noiselevel=-1)
+	writemsg(8*" " + colorize("GOOD", newprofile) + "\n\n", noiselevel=-1)
 	if len(dcontent) > 1:
 		writemsg(_("To upgrade do the following steps:\n"), noiselevel=-1)
 		for myline in dcontent[1:]:
 			writemsg(myline, noiselevel=-1)
 		writemsg("\n\n", noiselevel=-1)
+	else:
+		writemsg(_("You may use the following command to upgrade:\n\n"), noiselevel=-1)
+		writemsg(8*" " + colorize("INFORM", 'eselect profile set ' +
+			newprofile) + "\n\n", noiselevel=-1)
 
 	if settings is not None:
 		main_repo_loc = settings.repositories.mainRepoLocation()


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-02-11  3:06 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-02-11  3:06 UTC (permalink / raw
  To: gentoo-commits

commit:     34d8c817080f34f1a0b44cf05b99beacfc0d6314
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 11 03:06:20 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 11 03:06:20 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=34d8c817

deprecated_profile_check: suggest portage upgrade

If the new profile can't be parsed due to unsupported EAPI, then show a
warning like this:

!!! Your current profile is deprecated and not supported anymore.
!!! Use eselect profile to update your profile.
!!! Please upgrade to the following profile if possible:
        default/linux/x86/13.0/desktop

!!! Unable to parse profile: '/usr/portage/profiles/default/linux/x86/13.0/desktop'
!!! ParseError: Profile contains unsupported EAPI '5': '/usr/portage/profiles/eapi-5-files/eapi'

 * You must update portage before you can migrate to the above profile.
 * In order to update portage, run 'emerge --oneshot portage'.

---
 .../package/ebuild/deprecated_profile_check.py     |   29 +++++++++++++++++--
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/deprecated_profile_check.py b/pym/portage/package/ebuild/deprecated_profile_check.py
index 2acf8e3..2621ce7 100644
--- a/pym/portage/package/ebuild/deprecated_profile_check.py
+++ b/pym/portage/package/ebuild/deprecated_profile_check.py
@@ -5,6 +5,7 @@ __all__ = ['deprecated_profile_check']
 
 import io
 
+import portage
 from portage import os, _encodings, _unicode_encode
 from portage.const import DEPRECATED_PROFILE_FILE
 from portage.localization import _
@@ -12,10 +13,12 @@ from portage.output import colorize
 from portage.util import writemsg
 
 def deprecated_profile_check(settings=None):
-	config_root = "/"
+	config_root = None
+	eprefix = None
 	deprecated_profile_file = None
 	if settings is not None:
 		config_root = settings["PORTAGE_CONFIGROOT"]
+		eprefix = settings["EPREFIX"]
 		for x in reversed(settings.profiles):
 			deprecated_profile_file = os.path.join(x, "deprecated")
 			if os.access(deprecated_profile_file, os.R_OK):
@@ -24,10 +27,10 @@ def deprecated_profile_check(settings=None):
 			deprecated_profile_file = None
 
 	if deprecated_profile_file is None:
-		deprecated_profile_file = os.path.join(config_root,
+		deprecated_profile_file = os.path.join(config_root or "/",
 			DEPRECATED_PROFILE_FILE)
 		if not os.access(deprecated_profile_file, os.R_OK):
-			deprecated_profile_file = os.path.join(config_root,
+			deprecated_profile_file = os.path.join(config_root or "/",
 				'etc', 'make.profile', 'deprecated')
 			if not os.access(deprecated_profile_file, os.R_OK):
 				return
@@ -53,4 +56,24 @@ def deprecated_profile_check(settings=None):
 		for myline in dcontent[1:]:
 			writemsg(myline, noiselevel=-1)
 		writemsg("\n\n", noiselevel=-1)
+
+	if settings is not None:
+		main_repo_loc = settings.repositories.mainRepoLocation()
+		new_profile_path = os.path.join(main_repo_loc,
+			"profiles", newprofile.rstrip("\n"))
+
+		if os.path.isdir(new_profile_path):
+			new_config = portage.config(config_root=config_root,
+				config_profile_path=new_profile_path,
+				eprefix=eprefix)
+
+			if not new_config.profiles:
+				writemsg("\n %s %s\n" % (colorize("WARN", "*"),
+					_("You must update portage before you "
+					"can migrate to the above profile.")), noiselevel=-1)
+				writemsg(" %s %s\n\n" % (colorize("WARN", "*"),
+					_("In order to update portage, "
+					"run 'emerge --oneshot portage'.")),
+					noiselevel=-1)
+
 	return True


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-02-02  9:03 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-02-02  9:03 UTC (permalink / raw
  To: gentoo-commits

commit:     e746c0bf48eab6974e0537056fa93a356432b5ba
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  2 09:03:09 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb  2 09:03:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e746c0bf

Mask USE=test if RESTRICT=test, for bug #273272.

This just handles the simple case where RESTRICT=test is not
conditional on any USE flags.

---
 pym/portage/package/ebuild/config.py |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 352b298..a40cdd7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1514,7 +1514,33 @@ class config(object):
 		self.configdict["env"].addLazySingleton(
 			"PORTAGE_IUSE", _lazy_iuse_regex, portage_iuse)
 
-		ebuild_force_test = self.get("EBUILD_FORCE_TEST") == "1"
+		if pkg is None:
+			raw_restrict = pkg_configdict.get("RESTRICT")
+		else:
+			raw_restrict = pkg._raw_metadata["RESTRICT"]
+
+		restrict_test = False
+		if raw_restrict:
+			try:
+				if built_use is not None:
+					restrict = use_reduce(raw_restrict,
+						uselist=built_use, flat=True)
+				else:
+					# Use matchnone=True to ignore USE conditional parts
+					# of RESTRICT, since we want to know whether to mask
+					# the "test" flag _before_ we know the USE values
+					# that would be needed to evaluate the USE
+					# conditionals (see bug #273272).
+					restrict = use_reduce(raw_restrict,
+						matchnone=True, flat=True)
+			except PortageException:
+				pass
+			else:
+				restrict_test = "test" in restrict
+
+		ebuild_force_test = not restrict_test and \
+			self.get("EBUILD_FORCE_TEST") == "1"
+
 		if ebuild_force_test and \
 			not hasattr(self, "_ebuild_force_test_msg_shown"):
 				self._ebuild_force_test_msg_shown = True
@@ -1523,7 +1549,8 @@ class config(object):
 		if "test" in explicit_iuse or iuse_implicit_match("test"):
 			if "test" not in self.features:
 				use.discard("test")
-			elif "test" in self.usemask and not ebuild_force_test:
+			elif restrict_test or \
+				("test" in self.usemask and not ebuild_force_test):
 				# "test" is in IUSE and USE=test is masked, so execution
 				# of src_test() probably is not reliable. Therefore,
 				# temporarily disable FEATURES=test just for this package.


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-25 19:49 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-25 19:49 UTC (permalink / raw
  To: gentoo-commits

commit:     f8aeff8f33eaf6b9f634a45278f9eaef11633427
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 25 19:48:46 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jan 25 19:48:46 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f8aeff8f

Handle getpwuid KeyError for bug #454060.

---
 pym/portage/package/ebuild/doebuild.py |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 71a6f15..8c26523 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1420,8 +1420,30 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 		if "userpriv" in features and "userpriv" not in mysettings["PORTAGE_RESTRICT"].split() and secpass >= 2:
 			portage_build_uid = portage_uid
 			portage_build_gid = portage_gid
-	mysettings["PORTAGE_BUILD_USER"] = pwd.getpwuid(portage_build_uid).pw_name
-	mysettings["PORTAGE_BUILD_GROUP"] = grp.getgrgid(portage_build_gid).gr_name
+
+	if "PORTAGE_BUILD_USER" not in mysettings:
+		user = None
+		try:
+			user = pwd.getpwuid(portage_build_uid).pw_name
+		except KeyError:
+			if portage_build_uid == 0:
+				user = "root"
+			elif portage_build_uid == portage_uid:
+				user = portage.data._portage_username
+		if user is not None:
+			mysettings["PORTAGE_BUILD_USER"] = user
+
+	if "PORTAGE_BUILD_GROUP" not in mysettings:
+		group = None
+		try:
+			group = grp.getgrgid(portage_build_gid).gr_name
+		except KeyError:
+			if portage_build_gid == 0:
+				group = "root"
+			elif portage_build_gid == portage_gid:
+				group = portage.data._portage_grpname
+		if group is not None:
+			mysettings["PORTAGE_BUILD_GROUP"] = group
 
 	if not free:
 		free=((droppriv and "usersandbox" not in features) or \


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-15 15:16 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-15 15:16 UTC (permalink / raw
  To: gentoo-commits

commit:     7c624515d0bb106c8a468addff5df153cebf31fc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 15 15:16:02 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jan 15 15:16:02 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7c624515

Warn if old make.globals found, bug #452176

---
 pym/portage/package/ebuild/config.py |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 7bb85b3..1364a3d 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -376,8 +376,22 @@ class config(object):
 			# Allow make.globals to set default paths relative to ${EPREFIX}.
 			expand_map["EPREFIX"] = eprefix
 
-			make_globals = getconfig(os.path.join(
-				self.global_config_path, 'make.globals'),
+			make_globals_path = os.path.join(
+				self.global_config_path, 'make.globals')
+			old_make_globals = os.path.join(config_root,
+				'etc', 'make.globals')
+			if os.path.isfile(old_make_globals) and \
+				not os.path.samefile(make_globals_path, old_make_globals):
+				# Don't warn if they refer to the same path, since
+				# that can be used for backward compatibility with
+				# old software.
+				writemsg("!!! %s\n" %
+					_("Found obsolete make.globals file: "
+					"'%s', (using '%s' instead)") %
+					(old_make_globals, make_globals_path),
+					noiselevel=-1)
+
+			make_globals = getconfig(make_globals_path,
 				tolerant=tolerant, expand=expand_map)
 			if make_globals is None:
 				make_globals = {}


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-11  6:56 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-11  6:56 UTC (permalink / raw
  To: gentoo-commits

commit:     f659436760da2dd950d8f65db0fb1ea0f9719387
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 11 06:54:30 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jan 11 06:54:30 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f6594367

spawn_nofetch: import portage, bug #451344

---
 pym/portage/package/ebuild/_spawn_nofetch.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/_spawn_nofetch.py b/pym/portage/package/ebuild/_spawn_nofetch.py
index 898eb03..a808382 100644
--- a/pym/portage/package/ebuild/_spawn_nofetch.py
+++ b/pym/portage/package/ebuild/_spawn_nofetch.py
@@ -3,6 +3,7 @@
 
 import tempfile
 
+import portage
 from portage import os
 from portage import shutil
 from portage.const import EBUILD_PHASES


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-07  8:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-07  8:41 UTC (permalink / raw
  To: gentoo-commits

commit:     48479b4a3dd62085d1c746b7a807a39b1c6538f3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  7 07:11:28 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jan  7 08:40:43 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=48479b4a

If 2 make.conf files found, then warn.

This may give a clue to those who unintentionally end up with 2
make.conf files somehow.

---
 pym/portage/package/ebuild/config.py |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 3875b57..7bb85b3 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = [
@@ -330,11 +330,20 @@ class config(object):
 			except OSError:
 				pass
 
+			make_conf_count = 0
 			make_conf = {}
 			for x in make_conf_paths:
-				make_conf.update(getconfig(x,
+				mygcfg = getconfig(x,
 					tolerant=tolerant, allow_sourcing=True,
-					expand=make_conf) or {})
+					expand=make_conf)
+				if mygcfg is not None:
+					make_conf.update(mygcfg)
+					make_conf_count += 1
+
+			if make_conf_count == 2:
+				writemsg("!!! %s\n" %
+					_("Found 2 make.conf files, using both '%s' and '%s'") %
+					tuple(make_conf_paths), noiselevel=-1)
 
 			# Allow ROOT setting to come from make.conf if it's not overridden
 			# by the constructor argument (from the calling environment).


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-07  7:12 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-07  7:12 UTC (permalink / raw
  To: gentoo-commits

commit:     1a1b778c955dc7d34ed3fc4c7d207d9f48884199
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  7 07:11:28 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jan  7 07:11:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1a1b778c

If 2 make.conf files found, then warn.

This may give a clue to those who unintentionally end up with 2
make.conf files somehow.

---
 pym/portage/package/ebuild/config.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 3875b57..7fc8479 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = [
@@ -330,6 +330,11 @@ class config(object):
 			except OSError:
 				pass
 
+			if len(make_conf_paths) == 2:
+				writemsg("!!! %s\n" %
+					_("Found 2 make.conf files, using both '%s' and '%s'") %
+					tuple(make_conf_paths), noiselevel=-1)
+
 			make_conf = {}
 			for x in make_conf_paths:
 				make_conf.update(getconfig(x,


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2013-01-03 23:55 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2013-01-03 23:55 UTC (permalink / raw
  To: gentoo-commits

commit:     bf45677c1b3d70fb97bb09b6f93480c9b0f22fb9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  3 23:55:42 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jan  3 23:55:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bf45677c

_doebuild_spawn: disable close_fds for "depend"

---
 pym/portage/package/ebuild/doebuild.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 855c62a..ff7776c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ['doebuild', 'doebuild_environment', 'spawn', 'spawnebuild']
@@ -110,6 +110,11 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs):
 
 	if phase == 'depend':
 		kwargs['droppriv'] = 'userpriv' in settings.features
+		# It's not necessary to close_fds for this phase, since
+		# it should not spawn any daemons, and close_fds is
+		# best avoided since it can interact badly with some
+		# garbage collectors (see _setup_pipes docstring).
+		kwargs['close_fds'] = False
 
 	if actionmap is not None and phase in actionmap:
 		kwargs.update(actionmap[phase]["args"])


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-12-19 21:48 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-12-19 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     6b7994b6746b41c1405fefea5f003e79bf6fb755
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 19 21:48:00 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec 19 21:48:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6b7994b6

config: clarify that default target_root is /

---
 pym/portage/package/ebuild/config.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 75fc1de..3875b57 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -180,7 +180,8 @@ class config(object):
 		@type config_incrementals: List
 		@param config_root: path to read local config from (defaults to "/", see PORTAGE_CONFIGROOT)
 		@type config_root: String
-		@param target_root: __init__ override of $ROOT env variable.
+		@param target_root: the target root, which typically corresponds to the
+			value of the $ROOT env variable (default is /)
 		@type target_root: String
 		@param eprefix: set the EPREFIX variable (default is portage.const.EPREFIX)
 		@type eprefix: String


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-12-05 21:19 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-12-05 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e5095a4c0e92ff50b3866557568e226d7f6c6a66
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  5 21:19:16 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec  5 21:19:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e5095a4c

Avoid duplicate desktop QA notice, bug #446136

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index d737e66..880cdc4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1796,7 +1796,6 @@ def _post_src_install_uid_fix(mysettings, out):
 
 	destdir = mysettings["D"]
 	ed_len = len(mysettings["ED"])
-	desktopfile_errors = []
 	unicode_errors = []
 	desktop_file_validate = \
 		portage.process.find_binary("desktop-file-validate") is not None
@@ -1833,6 +1832,7 @@ def _post_src_install_uid_fix(mysettings, out):
 		counted_inodes = set()
 		fixlafiles_announced = False
 		fixlafiles = "fixlafiles" in mysettings.features
+		desktopfile_errors = []
 
 		for parent, dirs, files in os.walk(destdir):
 			try:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-12-05 18:02 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-12-05 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     f6473f300ff2e59472fb320143b2f668c6d2a447
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  5 18:01:30 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec  5 18:01:30 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f6473f30

getmaskingstatus: fix ~* KEYWORDS handling

Since commit 9144faeb653b9f1dbe74c69f85cd48f26761aa2f,
KeywordsManager.getMissingKeywords() has had support for ~* in KEYWORDS
being matched by any unstable keyword in ACCEPT_KEYWORDS. However,
getmaskingstatus still returned "missing keyword" for this case. Now,
getmaskingstatus is fixed so that it won't erroneously return
"missing keyword" in this case.

---
 pym/portage/package/ebuild/getmaskingstatus.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingstatus.py b/pym/portage/package/ebuild/getmaskingstatus.py
index 4dbe6a9..5c14b36 100644
--- a/pym/portage/package/ebuild/getmaskingstatus.py
+++ b/pym/portage/package/ebuild/getmaskingstatus.py
@@ -123,6 +123,13 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
 			if gp=="*":
 				kmask=None
 				break
+			elif gp == "~*":
+				for x in pgroups:
+					if x[:1] == "~":
+						kmask = None
+						break
+				if kmask is None:
+					break
 			elif gp=="-"+myarch and myarch in pgroups:
 				kmask="-"+myarch
 				break


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-10-18  4:58 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-10-18  4:58 UTC (permalink / raw
  To: gentoo-commits

commit:     27dbcfdd5cd285c8b40808ff0f791b25b6f1f3cd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 04:58:08 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 04:58:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=27dbcfdd

config.setcpv: use constructed _pkg_str for mycpv

---
 pym/portage/package/ebuild/config.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 9353b15..45a3351 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1312,8 +1312,9 @@ class config(object):
 				pkg_configdict["PORTAGE_REPO_NAME"] = repository
 			iuse = pkg_configdict["IUSE"]
 			if pkg is None:
-				cpv_slot = _pkg_str(self.mycpv, metadata=pkg_configdict,
+				self.mycpv = _pkg_str(self.mycpv, metadata=pkg_configdict,
 					settings=self)
+				cpv_slot = self.mycpv
 			else:
 				cpv_slot = pkg
 			pkginternaluse = []


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-10-18  3:43 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-10-18  3:43 UTC (permalink / raw
  To: gentoo-commits

commit:     5c48158a4af685e64d05a29fb54f43974c93ff3f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 03:43:17 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 03:43:17 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5c48158a

doebuild: fix REPLACING_VERSIONS EAPI 5 sub-slot

---
 pym/portage/package/ebuild/doebuild.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 650c363..0a1f1df 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -900,9 +900,8 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 			else:
 				vardb = vartree.dbapi
 				cpv = mysettings.mycpv
-				cp = portage.versions.cpv_getkey(cpv)
-				slot = mysettings["SLOT"]
-				cpv_slot = cp + ":" + slot
+				cpv_slot = "%s%s%s" % \
+					(cpv.cp, portage.dep._slot_separator, cpv.slot)
 				mysettings["REPLACING_VERSIONS"] = " ".join(
 					set(portage.versions.cpv_getversion(match) \
 						for match in vardb.match(cpv_slot) + \


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-10-18  1:56 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-10-18  1:56 UTC (permalink / raw
  To: gentoo-commits

commit:     9846cad27ac880271804e8065997024364b74906
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 01:56:18 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 01:56:18 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9846cad2

getmaskingreason: use _pkg_str

---
 pym/portage/package/ebuild/getmaskingreason.py |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 8a88c2f..20b76c4 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ['getmaskingreason']
@@ -6,13 +6,12 @@ __all__ = ['getmaskingreason']
 import portage
 from portage import os
 from portage.const import USER_CONFIG_PATH
-from portage.dep import Atom, match_from_list, _slot_separator, _repo_separator
+from portage.dep import Atom, match_from_list
 from portage.exception import InvalidAtom
 from portage.localization import _
 from portage.repository.config import _gen_valid_repo
 from portage.util import grablines, normalize_path
-from portage.versions import catpkgsplit
-from _emerge.Package import Package
+from portage.versions import catpkgsplit, _pkg_str
 
 def getmaskingreason(mycpv, metadata=None, settings=None,
 	portdb=None, return_location=False, myrepo=None):
@@ -60,15 +59,14 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 
 	# Sometimes we can't access SLOT or repository due to corruption.
 	pkg = mycpv
-	if metadata is not None:
-		pkg = "".join((mycpv, _slot_separator, metadata["SLOT"]))
-	# At this point myrepo should be None, a valid name, or
-	# Package.UNKNOWN_REPO which we ignore.
-	if myrepo is not None and myrepo != Package.UNKNOWN_REPO:
-		pkg = "".join((pkg, _repo_separator, myrepo))
+	try:
+		pkg.slot
+	except AttributeError:
+		pkg = _pkg_str(mycpv, metadata=metadata, repo=myrepo)
+
 	cpv_slot_list = [pkg]
 
-	mycp=mysplit[0]+"/"+mysplit[1]
+	mycp = pkg.cp
 
 	# XXX- This is a temporary duplicate of code from the config constructor.
 	locations = [os.path.join(settings["PORTDIR"], "profiles")]


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-10-18  0:50 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-10-18  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     3cfbb2404247fcfd10d49ed4628b9e22249618c0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 00:50:34 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 00:50:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3cfbb240

config.setcpv: remove unused slot variable

---
 pym/portage/package/ebuild/config.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 164014f..9353b15 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1310,7 +1310,6 @@ class config(object):
 			repository = pkg_configdict.pop("repository", None)
 			if repository is not None:
 				pkg_configdict["PORTAGE_REPO_NAME"] = repository
-			slot = pkg_configdict["SLOT"]
 			iuse = pkg_configdict["IUSE"]
 			if pkg is None:
 				cpv_slot = _pkg_str(self.mycpv, metadata=pkg_configdict,


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-10-08 22:07 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-10-08 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     3af5846c3c0c10b0cf80ca2e1921b9b7918bc277
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  8 22:07:34 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct  8 22:07:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3af5846c

fetch: preserve SRC_URI order for primaryuri

---
 pym/portage/package/ebuild/fetch.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 63b4c0a2..59d45be 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -407,7 +407,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 			file_uri_tuples.append((os.path.basename(myuri), myuri))
 
 	filedict = OrderedDict()
-	primaryuri_indexes={}
 	primaryuri_dict = {}
 	thirdpartymirror_uris = {}
 	for myfile, myuri in file_uri_tuples:
@@ -450,6 +449,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 				primaryuri_dict[myfile] = primaryuris
 			primaryuris.append(myuri)
 
+	# Order primaryuri_dict values to match that in SRC_URI.
+	for uris in primaryuri_dict.values():
+		uris.reverse()
+
 	# Prefer thirdpartymirrors over normal mirrors in cases when
 	# the file does not yet exist on the normal mirrors.
 	for myfile, uris in thirdpartymirror_uris.items():


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-21 22:17 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-21 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d6f16994180d624113ee8c0d3b9808b67516f821
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 21 22:17:45 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 21 22:17:45 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d6f16994

doebuild.py: remove unused f = None

---
 pym/portage/package/ebuild/doebuild.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index b9952be..e7a8983 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1786,7 +1786,6 @@ def _post_src_install_uid_fix(mysettings, out):
 		for i in xdg_dirs if i)
 
 	qa_desktop_file = ""
-	f = None
 	try:
 		with io.open(_unicode_encode(os.path.join(
 			mysettings["PORTAGE_BUILDDIR"],


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-21 18:01 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-21 18:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d1ea4ac22b9b972b684c379434d2a1b8e5f9d933
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 21 18:00:29 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 21 18:01:14 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d1ea4ac2

primaryuri: prefer thirdpartymirrors in SRC_URI

This will fix bug #435720.

---
 pym/portage/package/ebuild/fetch.py |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 260bf10..63b4c0a2 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -429,10 +429,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 
 				# now try the official mirrors
 				if mirrorname in thirdpartymirrors:
-					random.shuffle(thirdpartymirrors[mirrorname])
-
 					uris = [locmirr.rstrip("/") + "/" + path \
 						for locmirr in thirdpartymirrors[mirrorname]]
+					random.shuffle(uris)
 					filedict[myfile].extend(uris)
 					thirdpartymirror_uris.setdefault(myfile, []).extend(uris)
 
@@ -445,15 +444,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 			if restrict_fetch or force_mirror:
 				# Only fetch from specific mirrors is allowed.
 				continue
-			if "primaryuri" in restrict:
-				# Use the source site first.
-				if myfile in primaryuri_indexes:
-					primaryuri_indexes[myfile] += 1
-				else:
-					primaryuri_indexes[myfile] = 0
-				filedict[myfile].insert(primaryuri_indexes[myfile], myuri)
-			else:
-				filedict[myfile].append(myuri)
 			primaryuris = primaryuri_dict.get(myfile)
 			if primaryuris is None:
 				primaryuris = []
@@ -465,6 +455,15 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 	for myfile, uris in thirdpartymirror_uris.items():
 		primaryuri_dict.setdefault(myfile, []).extend(uris)
 
+	# Now merge primaryuri values into filedict (includes mirrors
+	# explicitly referenced in SRC_URI).
+	if "primaryuri" in restrict:
+		for myfile, uris in filedict.items():
+			filedict[myfile] = primaryuri_dict.get(myfile, []) + uris
+	else:
+		for myfile in filedict:
+			filedict[myfile] += primaryuri_dict.get(myfile, [])
+
 	can_fetch=True
 
 	if listonly:


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-20  3:38 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-20  3:38 UTC (permalink / raw
  To: gentoo-commits

commit:     48a61cc19483628d30346488c252008a8c646d39
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 03:37:55 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 03:37:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=48a61cc1

deprecated_profile_check: search more locations

This fixes it to search both /etc/make.profile and
/etc/portage/make.profile, and also makes it traverse parent profiles
when the settings parameter is passed in.

---
 .../package/ebuild/deprecated_profile_check.py     |   21 ++++++++++++++++---
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/deprecated_profile_check.py b/pym/portage/package/ebuild/deprecated_profile_check.py
index 3fab4da..ddb8c70 100644
--- a/pym/portage/package/ebuild/deprecated_profile_check.py
+++ b/pym/portage/package/ebuild/deprecated_profile_check.py
@@ -13,12 +13,25 @@ from portage.util import writemsg
 
 def deprecated_profile_check(settings=None):
 	config_root = "/"
+	deprecated_profile_file = None
 	if settings is not None:
 		config_root = settings["PORTAGE_CONFIGROOT"]
-	deprecated_profile_file = os.path.join(config_root,
-		DEPRECATED_PROFILE_FILE)
-	if not os.access(deprecated_profile_file, os.R_OK):
-		return False
+		for x in reversed(settings.profiles):
+			deprecated_profile_file = os.path.join(x, "deprecated")
+			if os.access(deprecated_profile_file, os.R_OK):
+				break
+		else:
+			deprecated_profile_file = None
+
+	if deprecated_profile_file is None:
+		deprecated_profile_file = os.path.join(config_root,
+			DEPRECATED_PROFILE_FILE)
+		if not os.access(deprecated_profile_file, os.R_OK):
+			deprecated_profile_file = os.path.join(config_root,
+				'etc', 'make.profile', 'deprecated')
+			if not os.access(deprecated_profile_file, os.R_OK):
+				return
+
 	dcontent = io.open(_unicode_encode(deprecated_profile_file,
 		encoding=_encodings['fs'], errors='strict'), 
 		mode='r', encoding=_encodings['content'], errors='replace').readlines()


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-20  3:14 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-20  3:14 UTC (permalink / raw
  To: gentoo-commits

commit:     81dc208f64523eaf6f67d064af436e25992e461f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 03:13:40 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 03:13:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=81dc208f

config: source make.conf only once if samefile

Since migration from /etc/make.conf to /etc/portage/make.conf, people
frequently ask if hardlinking or symlinking them is allowed. So, detect
this case and avoid redundant sourcing when appropriate.

---
 pym/portage/package/ebuild/config.py |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 2a05904..684de16 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -301,15 +301,21 @@ class config(object):
 			eprefix = locations_manager.eprefix
 			config_root = locations_manager.config_root
 			abs_user_config = locations_manager.abs_user_config
-
-			make_conf = getconfig(
+			make_conf_paths = [
 				os.path.join(config_root, 'etc', 'make.conf'),
-				tolerant=tolerant, allow_sourcing=True) or {}
+				os.path.join(config_root, MAKE_CONF_FILE)
+			]
+			try:
+				if os.path.samefile(*make_conf_paths):
+					make_conf_paths.pop()
+			except OSError:
+				pass
 
-			make_conf.update(getconfig(
-				os.path.join(config_root, MAKE_CONF_FILE),
-				tolerant=tolerant, allow_sourcing=True,
-				expand=make_conf) or {})
+			make_conf = {}
+			for x in make_conf_paths:
+				make_conf.update(getconfig(x,
+					tolerant=tolerant, allow_sourcing=True,
+					expand=make_conf) or {})
 
 			# Allow ROOT setting to come from make.conf if it's not overridden
 			# by the constructor argument (from the calling environment).
@@ -481,15 +487,11 @@ class config(object):
 			self.configlist.append(mygcfg)
 			self.configdict["defaults"]=self.configlist[-1]
 
-			mygcfg = getconfig(
-				os.path.join(config_root, 'etc', 'make.conf'),
-				tolerant=tolerant, allow_sourcing=True,
-				expand=expand_map) or {}
-
-			mygcfg.update(getconfig(
-				os.path.join(config_root, MAKE_CONF_FILE),
-				tolerant=tolerant, allow_sourcing=True,
-				expand=expand_map) or {})
+			mygcfg = {}
+			for x in make_conf_paths:
+				mygcfg.update(getconfig(x,
+					tolerant=tolerant, allow_sourcing=True,
+					expand=expand_map) or {})
 
 			# Don't allow the user to override certain variables in make.conf
 			profile_only_variables = self.configdict["defaults"].get(


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-20  2:36 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-20  2:36 UTC (permalink / raw
  To: gentoo-commits

commit:     c4a5a11080868abae6864e8fe6ab0ba2340ed51c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 02:36:03 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 02:36:03 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c4a5a110

config: _eapi_cache.clear() beginning constructor

This is important when config is reloaded after emerge --sync.

---
 pym/portage/package/ebuild/config.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index c1630cb..d2f62ac 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -178,6 +178,9 @@ class config(object):
 		@type _unmatched_removal: Boolean
 		"""
 
+		# This is important when config is reloaded after emerge --sync.
+		_eapi_cache.clear()
+
 		# When initializing the global portage.settings instance, avoid
 		# raising exceptions whenever possible since exceptions thrown
 		# from 'import portage' or 'import portage.exceptions' statements


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-09-14  2:24 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-09-14  2:24 UTC (permalink / raw
  To: gentoo-commits

commit:     a10fea0231db16dd8bbb5384c060844a20e9ef33
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 02:24:04 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 02:24:04 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a10fea02

Refactor FEATURES=test USE logic.

---
 pym/portage/package/ebuild/config.py |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index bb0a7c1..c1630cb 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1467,9 +1467,11 @@ class config(object):
 			not hasattr(self, "_ebuild_force_test_msg_shown"):
 				self._ebuild_force_test_msg_shown = True
 				writemsg(_("Forcing test.\n"), noiselevel=-1)
-		if "test" in self.features and \
-			("test" in explicit_iuse or iuse_implicit_match("test")):
-			if "test" in self.usemask and not ebuild_force_test:
+
+		if "test" in explicit_iuse or iuse_implicit_match("test"):
+			if "test" not in self.features:
+				use.discard("test")
+			elif "test" in self.usemask and not ebuild_force_test:
 				# "test" is in IUSE and USE=test is masked, so execution
 				# of src_test() probably is not reliable. Therefore,
 				# temporarily disable FEATURES=test just for this package.
@@ -1481,11 +1483,6 @@ class config(object):
 				if ebuild_force_test and "test" in self.usemask:
 					self.usemask = \
 						frozenset(x for x in self.usemask if x != "test")
-		elif "test" in explicit_iuse or iuse_implicit_match("test"):
-			if "test" in self.usemask or "test" not in self.features:
-				use.discard("test")
-			elif "test" in self.features:
-				use.add("test")
 
 		# Allow _* flags from USE_EXPAND wildcards to pass through here.
 		use.difference_update([x for x in use \


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-08-30 16:43 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-08-30 16:43 UTC (permalink / raw
  To: gentoo-commits

commit:     f9922394bbb674b04f6bed38c1598e8e2e01906f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 30 16:43:09 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Aug 30 16:43:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f9922394

config.setcpv: fix early ret for IUSE_EFFECTIVE

---
 pym/portage/package/ebuild/config.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index e871382..8f3b59b 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1243,6 +1243,7 @@ class config(object):
 		iuse = ""
 		pkg_configdict = self.configdict["pkg"]
 		previous_iuse = pkg_configdict.get("IUSE")
+		previous_iuse_effective = pkg_configdict.get("IUSE_EFFECTIVE")
 		previous_features = pkg_configdict.get("FEATURES")
 
 		aux_keys = self._setcpv_aux_keys
@@ -1433,7 +1434,8 @@ class config(object):
 
 		# If reset() has not been called, it's safe to return
 		# early if IUSE has not changed.
-		if not has_changed and previous_iuse == iuse:
+		if not has_changed and previous_iuse == iuse and \
+			(previous_iuse_effective is not None == eapi_attrs.iuse_effective):
 			return
 
 		# Filter out USE flags that aren't part of IUSE. This has to


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-08-23 17:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-08-23 17:10 UTC (permalink / raw
  To: gentoo-commits

commit:     905572230b2f156c10faa619e9e4d76b5540173a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 23 17:10:38 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Aug 23 17:10:38 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=90557223

config: _eapi_cache.clear() after setcpv

---
 pym/portage/package/ebuild/config.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 81e0501..4d871f4 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -811,7 +811,6 @@ class config(object):
 			# and subsequent calls to the _init() functions have no effect.
 			portage.output._init(config_root=self['PORTAGE_CONFIGROOT'])
 			portage.data._init(self)
-			_eapi_cache.clear()
 
 		if mycpv:
 			self.setcpv(mycpv)
@@ -1508,6 +1507,10 @@ class config(object):
 		self.configdict["env"]["PORTAGE_USE"] = \
 			" ".join(sorted(x for x in use if x[-2:] != '_*'))
 
+		# Clear the eapi cache here rather than in the constructor, since
+		# setcpv triggers lazy instantiation of things like _use_manager.
+		_eapi_cache.clear()
+
 	def _grab_pkg_env(self, penv, container, protected_keys=None):
 		if protected_keys is None:
 			protected_keys = ()


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-07-31 22:02 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-07-31 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     19e828fc178f0e55174ae923f6ba9a357fc86885
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 31 22:01:43 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jul 31 22:01:43 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=19e828fc

Check for desktop-file-validate binary.

---
 pym/portage/package/ebuild/doebuild.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index dfdfedc..395e0ee 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1749,6 +1749,8 @@ def _post_src_install_uid_fix(mysettings, out):
 	ed_len = len(mysettings["ED"])
 	desktopfile_errors = []
 	unicode_errors = []
+	desktop_file_validate = \
+		portage.process.find_binary("desktop-file-validate") is not None
 
 	while True:
 
@@ -1796,7 +1798,8 @@ def _post_src_install_uid_fix(mysettings, out):
 				else:
 					fpath = os.path.join(parent, fname)
 
-				if fname.endswith(".desktop") and os.path.isfile(fpath):
+				if desktop_file_validate and fname.endswith(".desktop") and \
+					os.path.isfile(fpath):
 					desktop_validate = validate_desktop_entry(fpath)
 					if desktop_validate:
 						desktopfile_errors.extend(desktop_validate)


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-07-31 10:21 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-07-31 10:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3836d4ec2da708677826cda1d3ea9f8281bde9c7
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 31 10:18:01 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jul 31 10:18:01 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3836d4ec

Validate desktop entries after src_install.

---
 pym/portage/package/ebuild/doebuild.py |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 09062f9..dfdfedc 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -28,6 +28,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 	'portage.package.ebuild._ipc.QueryCommand:QueryCommand',
 	'portage.dep._slot_abi:evaluate_slot_abi_equal_deps',
 	'portage.package.ebuild._spawn_nofetch:spawn_nofetch',
+	'portage.util._desktop_entry:validate_desktop_entry',
 	'portage.util.ExtractKernelVersion:ExtractKernelVersion'
 )
 
@@ -1746,6 +1747,7 @@ def _post_src_install_uid_fix(mysettings, out):
 
 	destdir = mysettings["D"]
 	ed_len = len(mysettings["ED"])
+	desktopfile_errors = []
 	unicode_errors = []
 
 	while True:
@@ -1794,6 +1796,11 @@ def _post_src_install_uid_fix(mysettings, out):
 				else:
 					fpath = os.path.join(parent, fname)
 
+				if fname.endswith(".desktop") and os.path.isfile(fpath):
+					desktop_validate = validate_desktop_entry(fpath)
+					if desktop_validate:
+						desktopfile_errors.extend(desktop_validate)
+
 				if fixlafiles and \
 					fname.endswith(".la") and os.path.isfile(fpath):
 					f = open(_unicode_encode(fpath,
@@ -1860,6 +1867,11 @@ def _post_src_install_uid_fix(mysettings, out):
 		if not unicode_error:
 			break
 
+	if desktopfile_errors:
+		for l in _merge_desktopfile_error(desktopfile_errors):
+			l = l.replace(mysettings["ED"], '/')
+			eqawarn(l, phase='install', key=mysettings.mycpv, out=out)
+
 	if unicode_errors:
 		for l in _merge_unicode_error(unicode_errors):
 			eqawarn(l, phase='install', key=mysettings.mycpv, out=out)
@@ -2022,6 +2034,20 @@ def _post_src_install_soname_symlinks(mysettings, out):
 	for line in qa_msg:
 		eqawarn(line, key=mysettings.mycpv, out=out)
 
+def _merge_desktopfile_error(errors):
+	lines = []
+
+	msg = _("QA Notice: This package installs one or more .desktop files "
+		"that do not pass validation.")
+	lines.extend(wrap(msg, 72))
+
+	lines.append("")
+	errors.sort()
+	lines.extend("\t" + x for x in errors)
+	lines.append("")
+
+	return lines
+
 def _merge_unicode_error(errors):
 	lines = []
 


^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-06-12  2:00 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-06-12  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     3a1575118627e0145cda09e93f5a076f3ec66feb
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 02:00:09 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 02:00:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3a157511

config: pass tolerant param to getconfig more

---
 pym/portage/package/ebuild/config.py |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 21fc1d5..2fa799f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -328,7 +328,7 @@ class config(object):
 			# lead to unexpected results.
 
 			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
-				expand=False) or {}
+				tolerant=tolerant, expand=False) or {}
 			expand_map = env_d.copy()
 			self._expand_map = expand_map
 
@@ -336,7 +336,8 @@ class config(object):
 			expand_map["EPREFIX"] = eprefix
 
 			make_globals = getconfig(os.path.join(
-				self.global_config_path, 'make.globals'), expand=expand_map)
+				self.global_config_path, 'make.globals'),
+				tolerant=tolerant, expand=expand_map)
 			if make_globals is None:
 				make_globals = {}
 
@@ -463,7 +464,8 @@ class config(object):
 			mygcfg = {}
 			if self.profiles:
 				mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"),
-					expand=expand_map) for x in self.profiles]
+					tolerant=tolerant, expand=expand_map)
+					for x in self.profiles]
 				self._make_defaults = mygcfg_dlists
 				mygcfg = stack_dicts(mygcfg_dlists,
 					incrementals=self.incrementals)
@@ -580,7 +582,7 @@ class config(object):
 			self._repo_make_defaults = {}
 			for repo in self.repositories.repos_with_profiles():
 				d = getconfig(os.path.join(repo.location, "profiles", "make.defaults"),
-					expand=self.configdict["globals"].copy()) or {}
+					tolerant=tolerant, expand=self.configdict["globals"].copy()) or {}
 				if d:
 					for k in chain(self._env_blacklist,
 						profile_only_variables, self._global_only_vars):
@@ -1868,7 +1870,8 @@ class config(object):
 		"""Reload things like /etc/profile.env that can change during runtime."""
 		env_d_filename = os.path.join(self["EROOT"], "etc", "profile.env")
 		self.configdict["env.d"].clear()
-		env_d = getconfig(env_d_filename, expand=False)
+		env_d = getconfig(env_d_filename,
+			tolerant=self._tolerant, expand=False)
 		if env_d:
 			# env_d will be None if profile.env doesn't exist.
 			for k in self._env_d_blacklist:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-06-02  0:13 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-06-02  0:13 UTC (permalink / raw
  To: gentoo-commits

commit:     415636896a148cac2c6f4406d80c669feb780f5e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  2 00:13:13 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun  2 00:13:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=41563689

config: lazy VirtualsManager instantiation

---
 pym/portage/package/ebuild/config.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 046ec46..21fc1d5 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -271,7 +271,9 @@ class config(object):
 			#all LicenseManager instances.
 			self._license_manager = clone._license_manager
 
-			self._virtuals_manager = copy.deepcopy(clone._virtuals_manager)
+			# force instantiation of lazy objects when cloning, so
+			# that they're not instantiated more than once
+			self._virtuals_manager_obj = copy.deepcopy(clone._virtuals_manager)
 
 			self._accept_properties = copy.deepcopy(clone._accept_properties)
 			self._ppropertiesdict = copy.deepcopy(clone._ppropertiesdict)
@@ -282,6 +284,7 @@ class config(object):
 			# lazily instantiated objects
 			self._keywords_manager_obj = None
 			self._mask_manager_obj = None
+			self._virtuals_manager_obj = None
 
 			locations_manager = LocationsManager(config_root=config_root,
 				config_profile_path=config_profile_path, eprefix=eprefix,
@@ -601,8 +604,6 @@ class config(object):
 				self._license_manager.extract_global_changes( \
 					self.configdict["conf"].get("ACCEPT_LICENSE", ""))
 
-			self._virtuals_manager = VirtualsManager(self.profiles)
-
 			if local_config:
 				#package.properties
 				propdict = grabdict_package(os.path.join(
@@ -903,6 +904,12 @@ class config(object):
 		return self._mask_manager_obj
 
 	@property
+	def _virtuals_manager(self):
+		if self._virtuals_manager_obj is None:
+			self._virtuals_manager_obj = VirtualsManager(self.profiles)
+		return self._virtuals_manager_obj
+
+	@property
 	def pkeywordsdict(self):
 		result = self._keywords_manager.pkeywordsdict.copy()
 		for k, v in result.items():



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-06-01 22:51 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-06-01 22:51 UTC (permalink / raw
  To: gentoo-commits

commit:     09980f19e584b644b9e2cf4d5e1e0369b6062ca1
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  1 22:51:10 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun  1 22:51:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=09980f19

config: lazy MaskManager instantiation

---
 pym/portage/package/ebuild/config.py |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 6f5680b..046ec46 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -181,6 +181,7 @@ class config(object):
 		# can practically render the api unusable for api consumers.
 		tolerant = hasattr(portage, '_initializing_globals')
 		self._tolerant = tolerant
+		self._unmatched_removal = _unmatched_removal
 
 		self.locked   = 0
 		self.mycpv    = None
@@ -205,6 +206,7 @@ class config(object):
 			# For immutable attributes, use shallow copy for
 			# speed and memory conservation.
 			self._tolerant = clone._tolerant
+			self._unmatched_removal = clone._unmatched_removal
 			self.categories = clone.categories
 			self.depcachedir = clone.depcachedir
 			self.incrementals = clone.incrementals
@@ -229,10 +231,10 @@ class config(object):
 			# immutable attributes (internal policy ensures lack of mutation)
 			self._locations_manager = clone._locations_manager
 			self._use_manager = clone._use_manager
-			self._mask_manager = clone._mask_manager
 			# force instantiation of lazy immutable objects when cloning, so
 			# that they're not instantiated more than once
 			self._keywords_manager_obj = clone._keywords_manager
+			self._mask_manager_obj = clone._mask_manager
 
 			# shared mutable attributes
 			self._unknown_features = clone._unknown_features
@@ -279,6 +281,7 @@ class config(object):
 		else:
 			# lazily instantiated objects
 			self._keywords_manager_obj = None
+			self._mask_manager_obj = None
 
 			locations_manager = LocationsManager(config_root=config_root,
 				config_profile_path=config_profile_path, eprefix=eprefix,
@@ -598,11 +601,6 @@ class config(object):
 				self._license_manager.extract_global_changes( \
 					self.configdict["conf"].get("ACCEPT_LICENSE", ""))
 
-			#Read package.mask and package.unmask from profiles and optionally from user config
-			self._mask_manager = MaskManager(self.repositories, profiles_complex,
-				abs_user_config, user_config=local_config,
-				strict_umatched_removal=_unmatched_removal)
-
 			self._virtuals_manager = VirtualsManager(self.profiles)
 
 			if local_config:
@@ -895,6 +893,16 @@ class config(object):
 		return self._keywords_manager_obj
 
 	@property
+	def _mask_manager(self):
+		if self._mask_manager_obj is None:
+			self._mask_manager_obj = MaskManager(self.repositories,
+				self._locations_manager.profiles_complex,
+				self._locations_manager.abs_user_config,
+				user_config=self.local_config,
+				strict_umatched_removal=self._unmatched_removal)
+		return self._mask_manager_obj
+
+	@property
 	def pkeywordsdict(self):
 		result = self._keywords_manager.pkeywordsdict.copy()
 		for k, v in result.items():



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-06-01 22:12 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-06-01 22:12 UTC (permalink / raw
  To: gentoo-commits

commit:     b03ed0de134456870c0361dd573e18830c45fa49
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  1 22:12:02 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun  1 22:12:02 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b03ed0de

config: lazy KeywordsManager instantiation

This allows a config instance to be instantiated by portageq, while
accessing /etc/portage/package.keywords only on demand, solving
bug #418475 by avoiding PermissionDenied exceptions when possible.

---
 pym/portage/package/ebuild/config.py |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 97cbd99..6f5680b 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -227,9 +227,12 @@ class config(object):
 			self._setcpv_args_hash = clone._setcpv_args_hash
 
 			# immutable attributes (internal policy ensures lack of mutation)
-			self._keywords_manager = clone._keywords_manager
+			self._locations_manager = clone._locations_manager
 			self._use_manager = clone._use_manager
 			self._mask_manager = clone._mask_manager
+			# force instantiation of lazy immutable objects when cloning, so
+			# that they're not instantiated more than once
+			self._keywords_manager_obj = clone._keywords_manager
 
 			# shared mutable attributes
 			self._unknown_features = clone._unknown_features
@@ -274,9 +277,13 @@ class config(object):
 			self._expand_map = copy.deepcopy(clone._expand_map)
 
 		else:
+			# lazily instantiated objects
+			self._keywords_manager_obj = None
+
 			locations_manager = LocationsManager(config_root=config_root,
 				config_profile_path=config_profile_path, eprefix=eprefix,
 				local_config=local_config, target_root=target_root)
+			self._locations_manager = locations_manager
 
 			eprefix = locations_manager.eprefix
 			config_root = locations_manager.config_root
@@ -574,10 +581,6 @@ class config(object):
 						d.pop(k, None)
 				self._repo_make_defaults[repo.name] = d
 
-			#Read package.keywords and package.accept_keywords.
-			self._keywords_manager = KeywordsManager(profiles_complex, abs_user_config, \
-				local_config, global_accept_keywords=self.configdict["defaults"].get("ACCEPT_KEYWORDS", ""))
-
 			#Read all USE related files from profiles and optionally from user config.
 			self._use_manager = UseManager(self.repositories, profiles_complex, abs_user_config, user_config=local_config)
 			#Initialize all USE related variables we track ourselves.
@@ -882,6 +885,16 @@ class config(object):
 					noiselevel=-1)
 
 	@property
+	def _keywords_manager(self):
+		if self._keywords_manager_obj is None:
+			self._keywords_manager_obj = KeywordsManager(
+				self._locations_manager.profiles_complex,
+				self._locations_manager.abs_user_config,
+				self.local_config,
+				global_accept_keywords=self.configdict["defaults"].get("ACCEPT_KEYWORDS", ""))
+		return self._keywords_manager_obj
+
+	@property
 	def pkeywordsdict(self):
 		result = self._keywords_manager.pkeywordsdict.copy()
 		for k, v in result.items():



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-16 19:44 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-16 19:44 UTC (permalink / raw
  To: gentoo-commits

commit:     9ebe11e40796c8d000a50eac0d9bce1f630c5668
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May 16 19:44:15 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May 16 19:44:15 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ebe11e4

_eapi_invalid: elog permission issue, bug #416231

---
 pym/portage/package/ebuild/_eapi_invalid.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/_eapi_invalid.py b/pym/portage/package/ebuild/_eapi_invalid.py
index 1ee8a8b..d23677d 100644
--- a/pym/portage/package/ebuild/_eapi_invalid.py
+++ b/pym/portage/package/ebuild/_eapi_invalid.py
@@ -3,6 +3,7 @@
 
 import textwrap
 
+import portage
 from portage.dep import _repo_separator
 from portage.elog import elog_process
 from portage.elog.messages import eerror
@@ -40,7 +41,14 @@ def eapi_invalid(self, cpv, repo_name, settings,
 			" FEATURES=parse-eapi-ebuild-head in make.conf in order to"
 			" make this error fatal."), 70))
 
-	for line in msg:
-		eerror(line, phase="other", key=cpv)
-	elog_process(cpv, settings,
-		phasefilter=("other",))
+	if portage.data.secpass >= 2:
+		# TODO: improve elog permission error handling (bug #416231)
+		for line in msg:
+			eerror(line, phase="other", key=cpv)
+		elog_process(cpv, settings,
+			phasefilter=("other",))
+
+	else:
+		out = portage.output.EOutput()
+		for line in msg:
+			out.eerror(line)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-16  4:55 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-16  4:55 UTC (permalink / raw
  To: gentoo-commits

commit:     b73cac4bb004da49b8d2075f06529a8c4e5269db
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May 16 04:54:58 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May 16 04:54:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b73cac4b

config: fix /etc/portage/make.profile error msg

---
 pym/portage/package/ebuild/config.py |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index aa4a62e..97cbd99 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -919,11 +919,26 @@ class config(object):
 					writemsg(_("!!! INVALID ACCEPT_KEYWORDS: %s\n") % str(group),
 						noiselevel=-1)
 
-		abs_profile_path = os.path.join(self["PORTAGE_CONFIGROOT"],
-			PROFILE_PATH)
-		if (not self.profile_path or \
-			not os.path.exists(os.path.join(self.profile_path, "parent"))) and \
-			os.path.exists(os.path.join(self["PORTDIR"], "profiles")):
+		profile_broken = not self.profile_path or \
+			not os.path.exists(os.path.join(self.profile_path, "parent")) and \
+			os.path.exists(os.path.join(self["PORTDIR"], "profiles"))
+
+		if profile_broken:
+			abs_profile_path = None
+			for x in (PROFILE_PATH, 'etc/portage/make.profile'):
+				x = os.path.join(self["PORTAGE_CONFIGROOT"], x)
+				try:
+					os.lstat(x)
+				except OSError:
+					pass
+				else:
+					abs_profile_path = x
+					break
+
+			if abs_profile_path is None:
+				abs_profile_path = os.path.join(self["PORTAGE_CONFIGROOT"],
+					PROFILE_PATH)
+
 			writemsg(_("\n\n!!! %s is not a symlink and will probably prevent most merges.\n") % abs_profile_path,
 				noiselevel=-1)
 			writemsg(_("!!! It should point into a profile within %s/profiles/\n") % self["PORTDIR"])



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-12  1:34 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-12  1:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5b6f367ee9c163c46810012c43f9b12b6794496c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 12 01:34:36 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat May 12 01:34:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5b6f367e

Fix handling of empty PORTDIR{,_OVERLAY} setting.

---
 pym/portage/package/ebuild/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1a88250..2434208 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -414,11 +414,11 @@ class config(object):
 			portdir_overlay = ""
 			for confs in [make_globals, make_conf, self.configdict["env"]]:
 				v = confs.get("PORTDIR")
-				if v:
+				if v is not None:
 					portdir = v
 					known_repos.append(v)
 				v = confs.get("PORTDIR_OVERLAY")
-				if v:
+				if v is not None:
 					portdir_overlay = v
 					known_repos.extend(shlex_split(v))
 			known_repos = frozenset(known_repos)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-11 22:54 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-11 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     c3a4dd7d026bd00eb80bd50178288083175a0d9e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May 11 22:53:50 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 11 22:53:50 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c3a4dd7d

config: load repositories before profile

This is useful for bug #414961, since we want to have access to the
repositories when we're loading the profile.

---
 pym/portage/package/ebuild/config.py |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 8941de0..45b048c 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -404,11 +404,28 @@ class config(object):
 
 			self.make_defaults_use = []
 
+			#Loading Repositories
+			self["PORTAGE_CONFIGROOT"] = config_root
+			self["ROOT"] = target_root
+			self["EPREFIX"] = eprefix
+			self["EROOT"] = eroot
 			known_repos = []
+			portdir = ""
+			portdir_overlay = ""
 			for confs in [make_globals, make_conf, self.configdict["env"]]:
-				known_repos.extend(shlex_split(confs.get("PORTDIR", '')))
-				known_repos.extend(shlex_split(confs.get("PORTDIR_OVERLAY", '')))
+				v = confs.get("PORTDIR")
+				if v:
+					portdir = v
+					known_repos.append(v)
+				v = confs.get("PORTDIR_OVERLAY")
+				if v:
+					portdir_overlay = v
+					known_repos.extend(shlex_split(v))
 			known_repos = frozenset(known_repos)
+			self["PORTDIR"] = portdir
+			self["PORTDIR_OVERLAY"] = portdir_overlay
+			self.lookuplist = [self.configdict["env"]]
+			self.repositories = load_repository_config(self)
 
 			locations_manager.load_profiles(known_repos)
 
@@ -517,9 +534,6 @@ class config(object):
 			self._ppropertiesdict = portage.dep.ExtendedAtomDict(dict)
 			self._penvdict = portage.dep.ExtendedAtomDict(dict)
 
-			#Loading Repositories
-			self.repositories = load_repository_config(self)
-
 			#filling PORTDIR and PORTDIR_OVERLAY variable for compatibility
 			main_repo = self.repositories.mainRepo()
 			if main_repo is not None:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-11 21:04 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-11 21:04 UTC (permalink / raw
  To: gentoo-commits

commit:     d31e55509111490d44de60c579e12473ad52a447
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May 11 21:04:15 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 11 21:04:15 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d31e5550

config: use shlex to split known_repos

---
 pym/portage/package/ebuild/config.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 32d6536..0cd35a8 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = [
@@ -406,8 +406,8 @@ class config(object):
 
 			known_repos = []
 			for confs in [make_globals, make_conf, self.configdict["env"]]:
-				known_repos.extend(confs.get("PORTDIR", '').split())
-				known_repos.extend(confs.get("PORTDIR_OVERLAY", '').split())
+				known_repos.extend(shlex_split(confs.get("PORTDIR", '')))
+				known_repos.extend(shlex_split(confs.get("PORTDIR_OVERLAY", '')))
 			known_repos = frozenset(known_repos)
 
 			locations_manager.load_profiles(known_repos)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-10 19:56 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2012-05-10 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     933ab0862f7333f0a4d1cc7ac85dea9f2693097c
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu May 10 19:54:25 2012 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Thu May 10 19:54:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=933ab086

Make REPOSITORY variable again available in global scope of ebuilds,
which use EAPI="4-python".
This fixes regression introduced in commit 1c26d24dfc869a6f5ef426f7c02e1d25abcda34e.

---
 pym/portage/package/ebuild/doebuild.py |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index ad6857f..faba9b6 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -342,8 +342,10 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	if not eapi_is_supported(eapi):
 		raise UnsupportedAPIException(mycpv, eapi)
 
-	if mydo != "depend":
+	if eapi_exports_REPOSITORY(eapi) and "PORTAGE_REPO_NAME" in mysettings.configdict["pkg"]:
+		mysettings.configdict["pkg"]["REPOSITORY"] = mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"]
 
+	if mydo != "depend":
 		if hasattr(mydbapi, "getFetchMap") and \
 			("A" not in mysettings.configdict["pkg"] or \
 			"AA" not in mysettings.configdict["pkg"]):
@@ -404,11 +406,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 				mysettings["KV"] = ""
 			mysettings.backup_changes("KV")
 
-		if eapi_exports_REPOSITORY(eapi) and \
-			"PORTAGE_REPO_NAME" in mysettings.configdict["pkg"]:
-			mysettings.configdict["pkg"]["REPOSITORY"] = \
-				mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"]
-
 _doebuild_manifest_cache = None
 _doebuild_broken_ebuilds = set()
 _doebuild_broken_manifests = set()



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-09 22:08 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-09 22:08 UTC (permalink / raw
  To: gentoo-commits

commit:     1c26d24dfc869a6f5ef426f7c02e1d25abcda34e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May  9 22:08:08 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  9 22:08:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1c26d24d

doebuild_environment: clean up EAPI related code

---
 pym/portage/package/ebuild/doebuild.py |   60 +++++++++++++++----------------
 1 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 53b7080..ad6857f 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -256,7 +256,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		mysettings['PORTDIR'] = repo.eclass_db.porttrees[0]
 		mysettings['PORTDIR_OVERLAY'] = ' '.join(repo.eclass_db.porttrees[1:])
 		mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"] = repo.name
-		mysettings.configdict["pkg"]["REPOSITORY"] = repo.name
 
 	mysettings["PORTDIR"] = os.path.realpath(mysettings["PORTDIR"])
 	mysettings["DISTDIR"] = os.path.realpath(mysettings["DISTDIR"])
@@ -331,19 +330,19 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 			os.environ["COLUMNS"] = columns
 		mysettings["COLUMNS"] = columns
 
-	# All EAPI dependent code comes last, so that essential variables
-	# like PORTAGE_BUILDDIR are still initialized even in cases when
+	# EAPI is always known here, even for the "depend" phase, because
+	# EbuildMetadataPhase gets it from _parse_eapi_ebuild_head().
+	eapi = mysettings.configdict['pkg']['EAPI']
+	_doebuild_path(mysettings, eapi=eapi)
+
+	# All EAPI dependent code comes last, so that essential variables like
+	# PATH and PORTAGE_BUILDDIR are still initialized even in cases when
 	# UnsupportedAPIException needs to be raised, which can be useful
 	# when uninstalling a package that has corrupt EAPI metadata.
-	eapi = mysettings.configdict['pkg'].get('EAPI')
+	if not eapi_is_supported(eapi):
+		raise UnsupportedAPIException(mycpv, eapi)
 
 	if mydo != "depend":
-		# Metadata vars such as EAPI and RESTRICT are
-		# set by the above config.setcpv() call.
-		if not eapi_is_supported(eapi):
-			# can't do anything with this.
-			_doebuild_path(mysettings)
-			raise UnsupportedAPIException(mycpv, eapi)
 
 		if hasattr(mydbapi, "getFetchMap") and \
 			("A" not in mysettings.configdict["pkg"] or \
@@ -369,9 +368,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 			else:
 				mysettings.configdict["pkg"]["AA"] = " ".join(uri_map)
 
-	_doebuild_path(mysettings, eapi=eapi)
-
-	if mydo != "depend":
 		ccache = "ccache" in mysettings.features
 		distcc = "distcc" in mysettings.features
 		if ccache or distcc:
@@ -391,25 +387,27 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 				mysettings["PATH"] = os.path.join(os.sep, eprefix_lstrip,
 					 "usr", libdir, "ccache", "bin") + ":" + mysettings["PATH"]
 
-	if not eapi_exports_KV(eapi):
-		# Discard KV for EAPIs that don't support it. Cache KV is restored
-		# from the backupenv whenever config.reset() is called.
-		mysettings.pop('KV', None)
-	elif mydo != 'depend' and 'KV' not in mysettings and \
-		mydo in ('compile', 'config', 'configure', 'info',
-		'install', 'nofetch', 'postinst', 'postrm', 'preinst',
-		'prepare', 'prerm', 'setup', 'test', 'unpack'):
-		mykv, err1 = ExtractKernelVersion(
-			os.path.join(mysettings['EROOT'], "usr/src/linux"))
-		if mykv:
-			# Regular source tree
-			mysettings["KV"] = mykv
-		else:
-			mysettings["KV"] = ""
-		mysettings.backup_changes("KV")
+		if not eapi_exports_KV(eapi):
+			# Discard KV for EAPIs that don't support it. Cached KV is restored
+			# from the backupenv whenever config.reset() is called.
+			mysettings.pop('KV', None)
+		elif 'KV' not in mysettings and \
+			mydo in ('compile', 'config', 'configure', 'info',
+			'install', 'nofetch', 'postinst', 'postrm', 'preinst',
+			'prepare', 'prerm', 'setup', 'test', 'unpack'):
+			mykv, err1 = ExtractKernelVersion(
+				os.path.join(mysettings['EROOT'], "usr/src/linux"))
+			if mykv:
+				# Regular source tree
+				mysettings["KV"] = mykv
+			else:
+				mysettings["KV"] = ""
+			mysettings.backup_changes("KV")
 
-	if mydo != "depend" and not eapi_exports_REPOSITORY(eapi):
-		mysettings.pop('REPOSITORY', None)
+		if eapi_exports_REPOSITORY(eapi) and \
+			"PORTAGE_REPO_NAME" in mysettings.configdict["pkg"]:
+			mysettings.configdict["pkg"]["REPOSITORY"] = \
+				mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"]
 
 _doebuild_manifest_cache = None
 _doebuild_broken_ebuilds = set()



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-05-09  8:13 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-05-09  8:13 UTC (permalink / raw
  To: gentoo-commits

commit:     4fef960c0b3681ea5389e3a639ab1e30115c2021
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May  9 08:12:58 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  9 08:12:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4fef960c

doebuild_environment: remove unused eapi parsing

---
 pym/portage/package/ebuild/doebuild.py |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4f7d4a8..53b7080 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -31,7 +31,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
 
 from portage import auxdbkeys, bsd_chflags, \
 	eapi_is_supported, merge, os, selinux, shutil, \
-	unmerge, _encodings, _parse_eapi_ebuild_head, _os_merge, \
+	unmerge, _encodings, _os_merge, \
 	_shell_quote, _unicode_decode, _unicode_encode
 from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \
 	EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY
@@ -335,27 +335,11 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	# like PORTAGE_BUILDDIR are still initialized even in cases when
 	# UnsupportedAPIException needs to be raised, which can be useful
 	# when uninstalling a package that has corrupt EAPI metadata.
-	eapi = None
-	if mydo == 'depend' and 'EAPI' not in mysettings.configdict['pkg']:
-		if eapi is None:
-			with io.open(_unicode_encode(ebuild_path,
-				encoding=_encodings['fs'], errors='strict'),
-				mode='r', encoding=_encodings['content'],
-				errors='replace') as f:
-				eapi, eapi_lineno = _parse_eapi_ebuild_head(f)
-				if eapi is None:
-					eapi = "0"
-
-		if eapi is not None:
-			if not eapi_is_supported(eapi):
-				_doebuild_path(mysettings)
-				raise UnsupportedAPIException(mycpv, eapi)
-			mysettings.configdict['pkg']['EAPI'] = eapi
+	eapi = mysettings.configdict['pkg'].get('EAPI')
 
 	if mydo != "depend":
 		# Metadata vars such as EAPI and RESTRICT are
 		# set by the above config.setcpv() call.
-		eapi = mysettings["EAPI"]
 		if not eapi_is_supported(eapi):
 			# can't do anything with this.
 			_doebuild_path(mysettings)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-04-22 22:11 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-04-22 22:11 UTC (permalink / raw
  To: gentoo-commits

commit:     9ccefaf0cd5987eadebac66e4c15464b65795cda
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 22 22:11:16 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 22:11:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ccefaf0

doebuild: cleanup tempfile if package phase fails

---
 pym/portage/package/ebuild/doebuild.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 29bef09..da30bda 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1040,6 +1040,13 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 				if mydo == "package" and bintree is not None:
 					bintree.inject(mysettings.mycpv,
 						filename=mysettings["PORTAGE_BINPKG_TMPFILE"])
+			else:
+				if "PORTAGE_BINPKG_TMPFILE" in mysettings:
+					try:
+						os.unlink(mysettings["PORTAGE_BINPKG_TMPFILE"])
+					except OSError:
+						pass
+
 		elif mydo=="qmerge":
 			# check to ensure install was run.  this *only* pops up when users
 			# forget it and are using ebuild



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-04-05 19:54 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-04-05 19:54 UTC (permalink / raw
  To: gentoo-commits

commit:     16b378f99938e1940fe2d6e2a898632189374a62
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  5 19:54:28 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr  5 19:54:28 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=16b378f9

config: populate expand map with profile.env

This behavior got disabled by commit
ed8a457e265ea1c23b66aeb12d00f1abd3d79e60, and now it's restored.

---
 pym/portage/package/ebuild/config.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 2cd21f3..38f15c0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -313,15 +313,15 @@ class config(object):
 			# Notably absent is "env", since we want to avoid any
 			# interaction with the calling environment that might
 			# lead to unexpected results.
-			expand_map = {}
+
+			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
+				expand=False) or {}
+			expand_map = env_d.copy()
 			self._expand_map = expand_map
 
 			# Allow make.globals to set default paths relative to ${EPREFIX}.
 			expand_map["EPREFIX"] = eprefix
 
-			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
-				expand=False)
-
 			make_globals = getconfig(os.path.join(
 				self.global_config_path, 'make.globals'), expand=expand_map)
 			if make_globals is None:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-04-03 15:39 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-04-03 15:39 UTC (permalink / raw
  To: gentoo-commits

commit:     318893ddf8cdcf778e7ba6a49f3ad062af19bdf9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 15:38:13 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 15:38:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=318893dd

_check_temp_dir: explicitly close temp file

---
 pym/portage/package/ebuild/doebuild.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 49672e1..29bef09 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1152,8 +1152,7 @@ def _check_temp_dir(settings):
 			noiselevel=-1)
 		return 1
 
-	else:
-		fd = tempfile.NamedTemporaryFile(prefix="exectest-", dir=checkdir)
+	with tempfile.NamedTemporaryFile(prefix="exectest-", dir=checkdir) as fd:
 		os.chmod(fd.name, 0o755)
 		if not os.access(fd.name, os.X_OK):
 			writemsg(_("Can not execute files in %s\n"



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-04-03  6:52 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-04-03  6:52 UTC (permalink / raw
  To: gentoo-commits

commit:     ed8a457e265ea1c23b66aeb12d00f1abd3d79e60
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 06:52:09 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 06:52:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ed8a457e

Don't use varexpand for profile.env, bug #410625.

---
 pym/portage/package/ebuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 4304e09..2cd21f3 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -320,7 +320,7 @@ class config(object):
 			expand_map["EPREFIX"] = eprefix
 
 			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
-				expand=expand_map)
+				expand=False)
 
 			make_globals = getconfig(os.path.join(
 				self.global_config_path, 'make.globals'), expand=expand_map)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-03-21 19:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-03-21 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     cf7bf7667a56a28a6c6f360bc77a01d05d64bdd8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 21 19:25:55 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar 21 19:25:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cf7bf766

getmaskingreason: use remember_source_file

This will fix bug #409179.

---
 pym/portage/package/ebuild/getmaskingreason.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index f2af638..8a88c2f 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -83,7 +83,13 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 	pmasklists = []
 	for profile in locations:
 		pmask_filename = os.path.join(profile, "package.mask")
-		pmasklists.append((pmask_filename, grablines(pmask_filename, recursive=1)))
+		node = None
+		for l, recursive_filename in grablines(pmask_filename,
+			recursive=1, remember_source_file=True):
+			if node is None or node[0] != recursive_filename:
+				node = (recursive_filename, [])
+				pmasklists.append(node)
+			node[1].append(l)
 
 	pmaskdict = settings._mask_manager._pmaskdict
 	if mycp in pmaskdict:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-03-19 18:33 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-03-19 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     4b183c1d9f7431e984dfe3f1ab93e3df15e9f31b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 18:33:28 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 18:33:28 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4b183c1d

doebuild_environment: comment on bug #408817

---
 pym/portage/package/ebuild/doebuild.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 56de554..ffad456 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -183,6 +183,14 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	if mysettings.mycpv is not None and \
 		mysettings.configdict["pkg"].get("PF") == mypv and \
 		"CATEGORY" in mysettings.configdict["pkg"]:
+		# Assume that PF is enough to assume that we've got
+		# the correct CATEGORY, though this is not really
+		# a solid assumption since it's possible (though
+		# unlikely) that two packages in different
+		# categories have the same PF. Callers should call
+		# setcpv or create a clean clone of a locked config
+		# instance in order to ensure that this assumption
+		# does not fail like in bug #408817.
 		cat = mysettings.configdict["pkg"]["CATEGORY"]
 		mycpv = mysettings.mycpv
 	elif os.path.basename(pkg_dir) in (mysplit[0], mypv):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-03-19 17:00 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-03-19 17:00 UTC (permalink / raw
  To: gentoo-commits

commit:     3ca5f0cc08d233a3e229e78b573c7aab7d46cb9c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 17:00:38 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 17:00:38 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3ca5f0cc

doebuild_environment: sanity check for bug 408817

Ensure that CATEGORY is determined correctly, and raise AssertionError
if it can't be determined.

---
 pym/portage/package/ebuild/doebuild.py |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 31ecf8c..56de554 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -174,20 +174,24 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	ebuild_path = os.path.abspath(myebuild)
 	pkg_dir     = os.path.dirname(ebuild_path)
 	mytree = os.path.dirname(os.path.dirname(pkg_dir))
-
-	if "CATEGORY" in mysettings.configdict["pkg"]:
-		cat = mysettings.configdict["pkg"]["CATEGORY"]
-	else:
-		cat = os.path.basename(normalize_path(os.path.join(pkg_dir, "..")))
-
 	mypv = os.path.basename(ebuild_path)[:-7]
-
-	mycpv = cat+"/"+mypv
 	mysplit = _pkgsplit(mypv)
 	if mysplit is None:
 		raise IncorrectParameter(
 			_("Invalid ebuild path: '%s'") % myebuild)
 
+	if mysettings.mycpv is not None and \
+		mysettings.configdict["pkg"].get("PF") == mypv and \
+		"CATEGORY" in mysettings.configdict["pkg"]:
+		cat = mysettings.configdict["pkg"]["CATEGORY"]
+		mycpv = mysettings.mycpv
+	elif os.path.basename(pkg_dir) in (mysplit[0], mypv):
+		# portdbapi or vardbapi
+		cat = os.path.basename(os.path.dirname(pkg_dir))
+		mycpv = cat + "/" + mypv
+	else:
+		raise AssertionError("unable to determine CATEGORY")
+
 	# Make a backup of PORTAGE_TMPDIR prior to calling config.reset()
 	# so that the caller can override it.
 	tmpdir = mysettings["PORTAGE_TMPDIR"]



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-02-17 21:35 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2012-02-17 21:35 UTC (permalink / raw
  To: gentoo-commits

commit:     28ae573f075d718389146f78f293a2120ce65157
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Feb 17 21:33:13 2012 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Fri Feb 17 21:33:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=28ae573f

portage.package.ebuild.fetch.fetch(): Fix ResourceWarning with Python 3.2.

---
 pym/portage/package/ebuild/fetch.py |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 8c20b71..022d3e8 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -1028,18 +1028,19 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 								# Fetch failed... Try the next one... Kill 404 files though.
 								if (mystat[stat.ST_SIZE]<100000) and (len(myfile)>4) and not ((myfile[-5:]==".html") or (myfile[-4:]==".htm")):
 									html404=re.compile("<title>.*(not found|404).*</title>",re.I|re.M)
-									if html404.search(io.open(
+									with io.open(
 										_unicode_encode(myfile_path,
 										encoding=_encodings['fs'], errors='strict'),
 										mode='r', encoding=_encodings['content'], errors='replace'
-										).read()):
-										try:
-											os.unlink(mysettings["DISTDIR"]+"/"+myfile)
-											writemsg(_(">>> Deleting invalid distfile. (Improper 404 redirect from server.)\n"))
-											fetched = 0
-											continue
-										except (IOError, OSError):
-											pass
+										) as f:
+										if html404.search(f.read()):
+											try:
+												os.unlink(mysettings["DISTDIR"]+"/"+myfile)
+												writemsg(_(">>> Deleting invalid distfile. (Improper 404 redirect from server.)\n"))
+												fetched = 0
+												continue
+											except (IOError, OSError):
+												pass
 								fetched = 1
 								continue
 							if True:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2012-02-13 23:45 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2012-02-13 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     6d2a73d7f78dac986539c0c6b841cc499c2088e6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 23:38:41 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 23:38:41 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6d2a73d7

Handle missing os.setgroups for PyPy.

See https://bugs.pypy.org/issue833 for details.

---
 pym/portage/package/ebuild/config.py   |   17 +++++++++++++++++
 pym/portage/package/ebuild/doebuild.py |    3 ++-
 pym/portage/package/ebuild/fetch.py    |    3 ++-
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 366f548..4304e09 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -938,6 +938,23 @@ class config(object):
 			writemsg(_("!!! FEATURES=fakeroot is enabled, but the "
 				"fakeroot binary is not installed.\n"), noiselevel=-1)
 
+		if os.getuid() == 0 and not hasattr(os, "setgroups"):
+			warning_shown = False
+
+			if "userpriv" in self.features:
+				writemsg(_("!!! FEATURES=userpriv is enabled, but "
+					"os.setgroups is not available.\n"), noiselevel=-1)
+				warning_shown = True
+
+			if "userfetch" in self.features:
+				writemsg(_("!!! FEATURES=userfetch is enabled, but "
+					"os.setgroups is not available.\n"), noiselevel=-1)
+				warning_shown = True
+
+			if warning_shown and platform.python_implementation() == 'PyPy':
+				writemsg(_("!!! See https://bugs.pypy.org/issue833 for details.\n"),
+					noiselevel=-1)
+
 	def load_best_module(self,property_string):
 		best_mod = best_from_dict(property_string,self.modules,self.module_priority)
 		mod = None

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index c52ab31..c45aa03 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1388,7 +1388,8 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 	# fake ownership/permissions will have to be converted to real
 	# permissions in the merge phase.
 	fakeroot = fakeroot and uid != 0 and portage.process.fakeroot_capable
-	if droppriv and not uid and portage_gid and portage_uid:
+	if droppriv and uid == 0 and portage_gid and portage_uid and \
+		hasattr(os, "setgroups"):
 		keywords.update({"uid":portage_uid,"gid":portage_gid,
 			"groups":userpriv_groups,"umask":0o02})
 	if not free:

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index c67f3c4..8c20b71 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -66,7 +66,8 @@ def _spawn_fetch(settings, args, **kwargs):
 		}
 
 	if "userfetch" in settings.features and \
-		os.getuid() == 0 and portage_gid and portage_uid:
+		os.getuid() == 0 and portage_gid and portage_uid and \
+		hasattr(os, "setgroups"):
 		kwargs.update(_userpriv_spawn_kwargs)
 
 	spawn_func = spawn



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-22 20:07 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-22 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     9ef18c2a97bee1ff94163b77573aea72d7a3b01b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 20:06:45 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 20:06:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ef18c2a

config.setcpv(): use dbapi._aux_cache_keys

This helps to avoid triggering the environment.bz2 extraction in
vardbapi.aux_get().

---
 pym/portage/package/ebuild/config.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f6166c6..366f548 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1188,8 +1188,11 @@ class config(object):
 				# packages since we want to save it PORTAGE_BUILT_USE for
 				# evaluating conditional USE deps in atoms passed via IPC to
 				# helpers like has_version and best_version.
+				aux_keys = set(aux_keys)
+				if hasattr(mydb, '_aux_cache_keys'):
+					aux_keys = aux_keys.intersection(mydb._aux_cache_keys)
+				aux_keys.add('USE')
 				aux_keys = list(aux_keys)
-				aux_keys.append('USE')
 				for k, v in zip(aux_keys, mydb.aux_get(self.mycpv, aux_keys)):
 					pkg_configdict[k] = v
 				built_use = frozenset(pkg_configdict.pop('USE').split())



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-22 19:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-22 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     a34586a73724d6075a556f82a05fc16893db31e0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 19:10:18 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 19:10:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a34586a7

fetch: don't apply permissions to symlinks

We don't want to modify anything outside of the primary DISTDIR,
and symlinks typically point to PORTAGE_RO_DISTDIRS. This will
fix bug #395705.

---
 pym/portage/package/ebuild/fetch.py |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 70743bf..c67f3c4 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -633,7 +633,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 				match, mystat = _check_distfile(
 					myfile_path, pruned_digests, eout)
 				if match:
-					if distdir_writable:
+					# Skip permission adjustment for symlinks, since we don't
+					# want to modify anything outside of the primary DISTDIR,
+					# and symlinks typically point to PORTAGE_RO_DISTDIRS.
+					if distdir_writable and not os.path.islink(myfile_path):
 						try:
 							apply_secpass_permissions(myfile_path,
 								gid=portage_gid, mode=0o664, mask=0o2,
@@ -747,14 +750,18 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 						raise
 					del e
 				else:
-					try:
-						apply_secpass_permissions(
-							myfile_path, gid=portage_gid, mode=0o664, mask=0o2,
-							stat_cached=mystat)
-					except PortageException as e:
-						if not os.access(myfile_path, os.R_OK):
-							writemsg(_("!!! Failed to adjust permissions:"
-								" %s\n") % str(e), noiselevel=-1)
+					# Skip permission adjustment for symlinks, since we don't
+					# want to modify anything outside of the primary DISTDIR,
+					# and symlinks typically point to PORTAGE_RO_DISTDIRS.
+					if not os.path.islink(myfile_path):
+						try:
+							apply_secpass_permissions(myfile_path,
+								gid=portage_gid, mode=0o664, mask=0o2,
+								stat_cached=mystat)
+						except PortageException as e:
+							if not os.access(myfile_path, os.R_OK):
+								writemsg(_("!!! Failed to adjust permissions:"
+									" %s\n") % (e,), noiselevel=-1)
 
 					# If the file is empty then it's obviously invalid. Remove
 					# the empty file and try to download if possible.



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-20  7:25 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-20  7:25 UTC (permalink / raw
  To: gentoo-commits

commit:     5f5f54b524b22e85c14539a9bb2ce52c7a4e312b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 07:24:38 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 07:24:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f5f54b5

Force COLUMNS > 0 for bug #394091.

---
 pym/portage/package/ebuild/doebuild.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 37aead0..3c0d023 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -313,6 +313,10 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		columns = os.environ.get("COLUMNS")
 		if columns is None:
 			rows, columns = portage.output.get_term_size()
+			if columns < 1:
+				# Force a sane value for COLUMNS, so that tools
+				# like ls don't complain (see bug #394091).
+				columns = 80
 			columns = str(columns)
 			os.environ["COLUMNS"] = columns
 		mysettings["COLUMNS"] = columns



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-13 17:00 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-13 17:00 UTC (permalink / raw
  To: gentoo-commits

commit:     70d7c7bfb20dec3fa66b0e6c1d9729ac87cab577
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 17:00:21 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 17:00:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=70d7c7bf

config: use frozenset for _constant_keys lookup

---
 pym/portage/package/ebuild/config.py |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 9a8486c..f6166c6 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -122,6 +122,9 @@ class config(object):
 	virtuals ...etc you look in here.
 	"""
 
+	_constant_keys = frozenset(['PORTAGE_BIN_PATH', 'PORTAGE_GID',
+		'PORTAGE_PYM_PATH'])
+
 	_setcpv_aux_keys = ('DEFINED_PHASES', 'DEPEND', 'EAPI',
 		'INHERITED', 'IUSE', 'REQUIRED_USE', 'KEYWORDS', 'LICENSE', 'PDEPEND',
 		'PROPERTIES', 'PROVIDE', 'RDEPEND', 'SLOT',
@@ -2126,14 +2129,16 @@ class config(object):
 
 	def _getitem(self, mykey):
 
-		# These ones point to temporary values when
-		# portage plans to update itself.
-		if mykey == "PORTAGE_BIN_PATH":
-			return portage._bin_path
-		elif mykey == "PORTAGE_PYM_PATH":
-			return portage._pym_path
-		elif mykey == "PORTAGE_GID":
-			return _unicode_decode(str(portage_gid))
+		if mykey in self._constant_keys:
+			# These two point to temporary values when
+			# portage plans to update itself.
+			if mykey == "PORTAGE_BIN_PATH":
+				return portage._bin_path
+			elif mykey == "PORTAGE_PYM_PATH":
+				return portage._pym_path
+
+			elif mykey == "PORTAGE_GID":
+				return _unicode_decode(str(portage_gid))
 
 		for d in self.lookuplist:
 			try:
@@ -2186,9 +2191,7 @@ class config(object):
 
 	def __iter__(self):
 		keys = set()
-		keys.add("PORTAGE_BIN_PATH")
-		keys.add("PORTAGE_PYM_PATH")
-		keys.add("PORTAGE_GID")
+		keys.update(self._constant_keys)
 		for d in self.lookuplist:
 			keys.update(d)
 		return iter(keys)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-10 22:19 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-10 22:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e51bcea18af2d08b2b608bb70e9e81f9f4ca16e9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 22:19:31 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 22:19:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e51bcea1

config: skip unneeded constructor code for clones

---
 pym/portage/package/ebuild/config.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index a8ec3c4..7fb4ff0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -784,10 +784,10 @@ class config(object):
 
 			self._validate_commands()
 
-		for k in self._case_insensitive_vars:
-			if k in self:
-				self[k] = self[k].lower()
-				self.backup_changes(k)
+			for k in self._case_insensitive_vars:
+				if k in self:
+					self[k] = self[k].lower()
+					self.backup_changes(k)
 
 		if mycpv:
 			self.setcpv(mycpv)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-10 17:49 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-10 17:49 UTC (permalink / raw
  To: gentoo-commits

commit:     cacbbe33b839737fecff2b81fc638bb40f08686c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 17:49:33 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 17:49:33 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cacbbe33

config.environ: allow prefix vars if no EAPI

This allows access to EPREFIX inside things like post_sync hooks, where
EAPI is undefined.

---
 pym/portage/package/ebuild/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index df719e2..9bb26ca 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2284,9 +2284,9 @@ class config(object):
 		# useless with prefix configurations. This brings compatibility with
 		# the prefix branch of portage, which also supports EPREFIX for all
 		# EAPIs (for obvious reasons).
-		if phase == 'depend' or eapi is None or \
+		if phase == 'depend' or \
 			('force-prefix' not in self.features and
-			not eapi_supports_prefix(eapi)):
+			eapi is not None and not eapi_supports_prefix(eapi)):
 			mydict.pop("ED", None)
 			mydict.pop("EPREFIX", None)
 			mydict.pop("EROOT", None)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-10 17:40 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-10 17:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d43e3f0b3c72b40bcb88e98fd445316d61d71ff6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 17:40:19 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 17:40:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d43e3f0b

doebuild: disable noauto for binpkgs later

This is safer since doebuild_environment() can modify FEATURES if
setcpv isn't called before.

---
 pym/portage/package/ebuild/doebuild.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4955c66..865ccd4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -560,10 +560,7 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 			os.path.dirname(os.path.dirname(pkgdir)))
 	else:
 		repo_config = None
-		# FEATURES=noauto only makes sense for porttree, and we don't want
-		# it to trigger redundant sourcing of the ebuild for api consumers
-		# that are using binary packages
-		mysettings.features.discard("noauto")
+
 	mf = None
 	if "strict" in features and \
 		"digest" not in features and \
@@ -738,6 +735,13 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 			if rval != os.EX_OK:
 				return rval
 
+		else:
+			# FEATURES=noauto only makes sense for porttree, and we don't want
+			# it to trigger redundant sourcing of the ebuild for API consumers
+			# that are using binary packages
+			if "noauto" in mysettings.features:
+				mysettings.features.discard("noauto")
+
 		# The info phase is special because it uses mkdtemp so and
 		# user (not necessarily in the portage group) can run it.
 		if mydo not in ('info',) and \



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-10  6:40 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-10  6:40 UTC (permalink / raw
  To: gentoo-commits

commit:     e295b46dfaf9ecf1ba3bcfa8038132053fd1cbd0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 06:40:14 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 06:40:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e295b46d

config: set PORTAGE_OVERRIDE_EPREFIX for subprocs

---
 pym/portage/package/ebuild/config.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 87cefee..df719e2 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -502,8 +502,13 @@ class config(object):
 			self["ROOT"] = target_root
 			self.backup_changes("ROOT")
 
+			# The PORTAGE_OVERRIDE_EPREFIX variable propagates the EPREFIX
+			# of this config instance to any portage commands or API
+			# consumers running in subprocesses.
 			self["EPREFIX"] = eprefix
 			self.backup_changes("EPREFIX")
+			self["PORTAGE_OVERRIDE_EPREFIX"] = eprefix
+			self.backup_changes("PORTAGE_OVERRIDE_EPREFIX")
 			self["EROOT"] = eroot
 			self.backup_changes("EROOT")
 



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-10  6:07 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-10  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     11a7448f1d5a0bfb38f8de9d66a8fa8d7118c877
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 06:07:07 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 06:07:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=11a7448f

config: constructor default portage.const.EPREFIX

---
 pym/portage/package/ebuild/config.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1288881..40a61a4 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -143,7 +143,8 @@ class config(object):
 
 	def __init__(self, clone=None, mycpv=None, config_profile_path=None,
 		config_incrementals=None, config_root=None, target_root=None,
-		_eprefix=None, local_config=True, env=None, _unmatched_removal=False):
+		_eprefix=portage.const.EPREFIX, local_config=True, env=None,
+		_unmatched_removal=False):
 		"""
 		@param clone: If provided, init will use deepcopy to copy by value the instance.
 		@type clone: Instance of config class.



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-12-09 23:16 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-12-09 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     9ba122ee2242369aed344e3756d29c9b153bdbc8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  9 23:16:08 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Dec  9 23:16:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ba122ee

Auto-generate PORTAGE_GRP/USERNAME for prefix.

For prefix environments, default to the UID and GID of the top-level
EROOT directory. This allows us to avoid using hardcoded defaults. It's
still possible to override these variables via make.conf.

---
 pym/portage/package/ebuild/config.py |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index bf33978..1288881 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -7,8 +7,10 @@ __all__ = [
 
 import copy
 from itertools import chain
+import grp
 import logging
 import platform
+import pwd
 import re
 import sys
 import warnings
@@ -739,6 +741,24 @@ class config(object):
 					default_inst_ids["PORTAGE_INST_GID"] = str(eroot_st.st_gid)
 					default_inst_ids["PORTAGE_INST_UID"] = str(eroot_st.st_uid)
 
+					if "PORTAGE_USERNAME" not in self:
+						try:
+							pwd_struct = pwd.getpwuid(eroot_st.st_uid)
+						except KeyError:
+							pass
+						else:
+							self["PORTAGE_USERNAME"] = pwd_struct.pw_name
+							self.backup_changes("PORTAGE_USERNAME")
+
+					if "PORTAGE_GRPNAME" not in self:
+						try:
+							grp_struct = grp.getgrgid(eroot_st.st_gid)
+						except KeyError:
+							pass
+						else:
+							self["PORTAGE_GRPNAME"] = grp_struct.gr_name
+							self.backup_changes("PORTAGE_GRPNAME")
+
 			for var, default_val in default_inst_ids.items():
 				try:
 					self[var] = str(int(self.get(var, default_val)))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-29 16:25 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-29 16:25 UTC (permalink / raw
  To: gentoo-commits

commit:     10017a62b227558ed446419a2133c1584676c01c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 29 16:24:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 29 16:24:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=10017a62

doebuild: disable noauto for binary packages

---
 pym/portage/package/ebuild/doebuild.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4ba523c..e42d9a4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -560,6 +560,10 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 			os.path.dirname(os.path.dirname(pkgdir)))
 	else:
 		repo_config = None
+		# FEATURES=noauto only makes sense for porttree, and we don't want
+		# it to trigger redundant sourcing of the ebuild for api consumers
+		# that are using binary packages
+		mysettings.features.discard("noauto")
 	mf = None
 	if "strict" in features and \
 		"digest" not in features and \



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-26  2:57 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-26  2:57 UTC (permalink / raw
  To: gentoo-commits

commit:     917e70d1009727115afbe90e297711d54b7e5374
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 02:56:54 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 02:57:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=917e70d1

config: fix make.defaults inherit of make.globals

Since commit e544ee13527a0568de2b556510280ed96fc1b3ff, make.defaults
inheritance of variables from make.globals has been broke, since that
commit excluded make.globals from expand_map. This broke settings like
PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa" from the developer
profile, as reported in bug #391323, comment #4.

---
 pym/portage/package/ebuild/config.py |   45 +++++++++++++++++----------------
 1 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 835cd23..2995740 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -297,7 +297,29 @@ class config(object):
 			eroot = locations_manager.eroot
 			self.global_config_path = locations_manager.global_config_path
 
-			make_globals = getconfig(os.path.join(self.global_config_path, 'make.globals'))
+			# The expand_map is used for variable substitution
+			# in getconfig() calls, and the getconfig() calls
+			# update expand_map with the value of each variable
+			# assignment that occurs. Variable substitution occurs
+			# in the following order, which corresponds to the
+			# order of appearance in self.lookuplist:
+			#
+			#   * env.d
+			#   * make.globals
+			#   * make.defaults
+			#   * make.conf
+			#
+			# Notably absent is "env", since we want to avoid any
+			# interaction with the calling environment that might
+			# lead to unexpected results.
+			expand_map = {}
+			self._expand_map = expand_map
+
+			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
+				expand=expand_map)
+
+			make_globals = getconfig(os.path.join(
+				self.global_config_path, 'make.globals'), expand=expand_map)
 			if make_globals is None:
 				make_globals = {}
 
@@ -345,30 +367,9 @@ class config(object):
 			self.configlist.append({})
 			self.configdict["pkginternal"] = self.configlist[-1]
 
-			# The expand_map is used for variable substitution
-			# in getconfig() calls, and the getconfig() calls
-			# update expand_map with the value of each variable
-			# assignment that occurs. Variable substitution occurs
-			# in the following order, which corresponds to the
-			# order of appearance in self.lookuplist:
-			#
-			#   * env.d
-			#   * make.globals
-			#   * make.defaults
-			#   * make.conf
-			#
-			# Notably absent is "env", since we want to avoid any
-			# interaction with the calling environment that might
-			# lead to unexpected results.
-			expand_map = {}
-			self._expand_map = expand_map
-
-			env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
-				expand=expand_map)
 			# env_d will be None if profile.env doesn't exist.
 			if env_d:
 				self.configdict["env.d"].update(env_d)
-				expand_map.update(env_d)
 
 			# backupenv is used for calculating incremental variables.
 			if env is None:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-18 21:11 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-18 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c170578a89c2354a595f34b68ab55622dd942252
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 18 21:11:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 18 21:11:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c170578a

_prepare_self_update: detect if already called

This is should never be triggered by portage, but it's possible that
an API consumer might trigger it somehow.

---
 pym/portage/package/ebuild/doebuild.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 9e71cfc..4ba523c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -2024,6 +2024,10 @@ def _prepare_self_update(settings):
 	automatically clean up the temporary copies.
 	"""
 
+	# sanity check: ensure that that this routine only runs once
+	if portage._bin_path != portage.const.PORTAGE_BIN_PATH:
+		return
+
 	# Load lazily referenced portage submodules into memory,
 	# so imports won't fail during portage upgrade/downgrade.
 	_preload_elog_modules(settings)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-18  5:16 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-18  5:16 UTC (permalink / raw
  To: gentoo-commits

commit:     fcb918d19bfd96dbafcacb67d54977aa9e471013
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 18 05:15:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 18 05:15:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fcb918d1

config: tweak mapping implementation more

---
 pym/portage/package/ebuild/config.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index b722a21..835cd23 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2094,8 +2094,10 @@ class config(object):
 			return portage._pym_path
 
 		for d in self.lookuplist:
-			if mykey in d:
+			try:
 				return d[mykey]
+			except KeyError:
+				pass
 
 		raise KeyError(mykey)
 
@@ -2153,7 +2155,7 @@ class config(object):
 
 	def iteritems(self):
 		for k in self:
-			yield (k, self[k])
+			yield (k, self._getitem(k))
 
 	def items(self):
 		return list(self.iteritems())



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-18  3:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-18  3:26 UTC (permalink / raw
  To: gentoo-commits

commit:     2793d2259c34e32bc3f208f5c6f402ebd71e1077
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 18 03:26:18 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 18 03:26:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2793d225

config: centralize mapping impl in _getitem/pop

---
 pym/portage/package/ebuild/config.py |   36 +++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 6d5de92..b722a21 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2076,13 +2076,15 @@ class config(object):
 				self._virtuals_manager._treeVirtuals = {}
 
 	def __delitem__(self,mykey):
-		self.modifying()
-		for x in self.lookuplist:
-			if x != None:
-				if mykey in x:
-					del x[mykey]
+		self.pop(mykey)
+
+	def __getitem__(self, key):
+		try:
+			return self._getitem(key)
+		except KeyError:
+			return '' # for backward compat, don't raise KeyError
 
-	def __getitem__(self,mykey):
+	def _getitem(self, mykey):
 
 		# These ones point to temporary values when
 		# portage plans to update itself.
@@ -2094,15 +2096,17 @@ class config(object):
 		for d in self.lookuplist:
 			if mykey in d:
 				return d[mykey]
-		return '' # for backward compat, don't raise KeyError
+
+		raise KeyError(mykey)
 
 	def get(self, k, x=None):
-		for d in self.lookuplist:
-			if k in d:
-				return d[k]
-		return x
+		try:
+			return self._getitem(k)
+		except KeyError:
+			return x
 
 	def pop(self, key, *args):
+		self.modifying()
 		if len(args) > 1:
 			raise TypeError(
 				"pop expected at most 2 arguments, got " + \
@@ -2118,10 +2122,12 @@ class config(object):
 
 	def __contains__(self, mykey):
 		"""Called to implement membership test operators (in and not in)."""
-		for d in self.lookuplist:
-			if mykey in d:
-				return True
-		return False
+		try:
+			 self._getitem(mykey)
+		except KeyError:
+			return False
+		else:
+			return True
 
 	def setdefault(self, k, x=None):
 		v = self.get(k)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-11-09  2:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-11-09  2:41 UTC (permalink / raw
  To: gentoo-commits

commit:     2019a225ad017927ac333a047947fd6897edd256
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 02:41:16 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 02:41:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2019a225

_doebuild_path: fix EAPI 3 helpers PATH

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index da95a63..3b72807 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -134,7 +134,7 @@ def _doebuild_path(settings, eapi=None):
 
 	path = []
 
-	if eapi not in (None, "0", "1", "2"):
+	if eapi not in (None, "0", "1", "2", "3"):
 		path.append(os.path.join(portage_bin_path, "ebuild-helpers", "4"))
 
 	path.append(os.path.join(portage_bin_path, "ebuild-helpers"))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-29  4:21 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-29  4:21 UTC (permalink / raw
  To: gentoo-commits

commit:     f06f1d8e2174527cc7f4b5491f0f84d41f368d62
Author:     Daniel Robbins <drobbins <AT> funtoo <DOT> org>
AuthorDate: Sat Oct 29 04:06:00 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 04:21:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f06f1d8e

Fix an issue where emerge will abort when merge starts if we have a file in our Manifest that does not exist on disk, even with thin-manifest enabled.

---
 pym/portage/package/ebuild/digestcheck.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index 3b22b1d..c8d168e 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -35,7 +35,7 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None, mf=None):
 	eout = EOutput()
 	eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1"
 	try:
-		if strict and "PORTAGE_PARALLEL_FETCHONLY" not in mysettings:
+		if not mf.thin and strict and "PORTAGE_PARALLEL_FETCHONLY" not in mysettings:
 			if mf.fhashdict.get("EBUILD"):
 				eout.ebegin(_("checking ebuild checksums ;-)"))
 				mf.checkTypeHashes("EBUILD")



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-28 22:06 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-28 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     46c50903c00123a4e30b9032fe9ffc345c811570
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 22:06:50 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 22:06:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=46c50903

config: discard profiles_complex attribute

Like LocationsManager, it's only used in the constructor, so there's
no need to hold a reference after the constructor completes.

---
 pym/portage/package/ebuild/config.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1ad1ad7..765a4f7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -210,7 +210,6 @@ class config(object):
 			self.module_priority = clone.module_priority
 			self.profile_path = clone.profile_path
 			self.profiles = clone.profiles
-			self.profiles_complex = clone.profiles_complex
 			self.packages = clone.packages
 			self.repositories = clone.repositories
 			self._iuse_implicit_match = clone._iuse_implicit_match
@@ -408,8 +407,8 @@ class config(object):
 
 			locations_manager.load_profiles(known_repos)
 
+			profiles_complex = locations_manager.profiles_complex
 			self.profiles = locations_manager.profiles
-			self.profiles_complex = locations_manager.profiles_complex
 			self.profile_path = locations_manager.profile_path
 			self.user_profile_dir = locations_manager.user_profile_dir
 
@@ -556,11 +555,11 @@ class config(object):
 				self._repo_make_defaults[repo.name] = d
 
 			#Read package.keywords and package.accept_keywords.
-			self._keywords_manager = KeywordsManager(self.profiles_complex, abs_user_config, \
+			self._keywords_manager = KeywordsManager(profiles_complex, abs_user_config, \
 				local_config, global_accept_keywords=self.configdict["defaults"].get("ACCEPT_KEYWORDS", ""))
 
 			#Read all USE related files from profiles and optionally from user config.
-			self._use_manager = UseManager(self.repositories, self.profiles_complex, abs_user_config, user_config=local_config)
+			self._use_manager = UseManager(self.repositories, profiles_complex, abs_user_config, user_config=local_config)
 			#Initialize all USE related variables we track ourselves.
 			self.usemask = self._use_manager.getUseMask()
 			self.useforce = self._use_manager.getUseForce()
@@ -577,7 +576,7 @@ class config(object):
 					self.configdict["conf"].get("ACCEPT_LICENSE", ""))
 
 			#Read package.mask and package.unmask from profiles and optionally from user config
-			self._mask_manager = MaskManager(self.repositories, self.profiles_complex,
+			self._mask_manager = MaskManager(self.repositories, profiles_complex,
 				abs_user_config, user_config=local_config,
 				strict_umatched_removal=_unmatched_removal)
 
@@ -639,7 +638,7 @@ class config(object):
 			pkgprovidedlines = [grabfile(
 				os.path.join(x.location, "package.provided"),
 				recursive=x.portage1_directories)
-				for x in self.profiles_complex]
+				for x in profiles_complex]
 			pkgprovidedlines = stack_lists(pkgprovidedlines, incremental=1)
 			has_invalid_data = False
 			for x in range(len(pkgprovidedlines)-1, -1, -1):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-28  2:16 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-28  2:16 UTC (permalink / raw
  To: gentoo-commits

commit:     0cc9ac937c5dc19307f42fcc9cba7439a93ade55
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 02:15:34 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 02:15:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0cc9ac93

Fix mydcfg from last commit.

---
 pym/portage/package/ebuild/config.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 3640ee0..1ad1ad7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -426,6 +426,7 @@ class config(object):
 				self.prevmaskdict.setdefault(x.cp, []).append(x)
 
 
+			mygcfg = {}
 			if self.profiles:
 				mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"),
 					expand=expand_map) for x in self.profiles]



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-28  2:04 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-28  2:04 UTC (permalink / raw
  To: gentoo-commits

commit:     db3cfd18b4a2c7efbb579f00101c995920413cbb
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 02:04:25 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 02:04:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=db3cfd18

config: remove cruft

The mygcfg and packages_list attributes are both useless.

---
 pym/portage/package/ebuild/config.py |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 47ea7f8..3640ee0 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -399,7 +399,6 @@ class config(object):
 			self.configdict["globals"]=self.configlist[-1]
 
 			self.make_defaults_use = []
-			self.mygcfg = {}
 
 			known_repos = []
 			for confs in [make_globals, make_conf, self.configdict["env"]]:
@@ -414,10 +413,9 @@ class config(object):
 			self.profile_path = locations_manager.profile_path
 			self.user_profile_dir = locations_manager.user_profile_dir
 
-			self.packages_list = [grabfile_package(os.path.join(x, "packages"), verify_eapi=True) for x in self.profiles]
-			self.packages      = tuple(stack_lists(self.packages_list, incremental=1))
-			del self.packages_list
-			#self.packages = grab_stacked("packages", self.profiles, grabfile, incremental_lines=1)
+			packages_list = [grabfile_package(os.path.join(x, "packages"),
+				verify_eapi=True) for x in self.profiles]
+			self.packages = tuple(stack_lists(packages_list, incremental=1))
 
 			# revmaskdict
 			self.prevmaskdict={}
@@ -432,19 +430,19 @@ class config(object):
 				mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"),
 					expand=expand_map) for x in self.profiles]
 				self._make_defaults = mygcfg_dlists
-				self.mygcfg = stack_dicts(mygcfg_dlists,
+				mygcfg = stack_dicts(mygcfg_dlists,
 					incrementals=self.incrementals)
-				if self.mygcfg is None:
-					self.mygcfg = {}
-			self.configlist.append(self.mygcfg)
+				if mygcfg is None:
+					mygcfg = {}
+			self.configlist.append(mygcfg)
 			self.configdict["defaults"]=self.configlist[-1]
 
-			self.mygcfg = getconfig(
+			mygcfg = getconfig(
 				os.path.join(config_root, MAKE_CONF_FILE),
 				tolerant=tolerant, allow_sourcing=True,
 				expand=expand_map) or {}
 
-			self.mygcfg.update(getconfig(
+			mygcfg.update(getconfig(
 				os.path.join(abs_user_config, 'make.conf'),
 				tolerant=tolerant, allow_sourcing=True,
 				expand=expand_map) or {})
@@ -469,9 +467,9 @@ class config(object):
 				env_d.pop(k, None)
 
 			for k in profile_only_variables:
-				self.mygcfg.pop(k, None)
+				mygcfg.pop(k, None)
 
-			self.configlist.append(self.mygcfg)
+			self.configlist.append(mygcfg)
 			self.configdict["conf"]=self.configlist[-1]
 
 			self.configlist.append(LazyItemsDict())
@@ -760,6 +758,11 @@ class config(object):
 		if mycpv:
 			self.setcpv(mycpv)
 
+	@property
+	def mygcfg(self):
+		warnings.warn("portage.config.mygcfg is deprecated", stacklevel=3)
+		return {}
+
 	def _validate_commands(self):
 		for k in special_env_vars.validate_commands:
 			v = self.get(k)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-24 22:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-24 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     70467e9cc23395d257a1475fd12a1f159a8e7ced
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 22:26:35 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 22:26:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=70467e9c

doebuid: deprecate redundant "root" parameter

---
 pym/portage/package/ebuild/doebuild.py |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index a324af2..a2d2c8c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -358,7 +358,7 @@ _doebuild_commands_without_builddir = (
 	'fetch', 'fetchall', 'help', 'manifest'
 )
 
-def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
+def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
 	fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None,
 	mydbapi=None, vartree=None, prev_mtimes=None,
 	fd_pipes=None, returnpid=False):
@@ -370,10 +370,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 	@type myebuild: String
 	@param mydo: Phase to run
 	@type mydo: String
-	@param myroot: $ROOT (usually '/', see man make.conf)
-	@type myroot: String
-	@param mysettings: Portage Configuration
-	@type mysettings: instance of portage.config
+	@param _unused: Deprecated (use settings["ROOT"] instead)
+	@type _unused: String
+	@param settings: Portage Configuration
+	@type settings: instance of portage.config
 	@param debug: Turns on various debug information (eg, debug for spawn)
 	@type debug: Boolean
 	@param listonly: Used to wrap fetch(); passed such that fetch only lists files required.
@@ -416,7 +416,18 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 	Other variables may not be strictly required, many have defaults that are set inside of doebuild.
 	
 	"""
-	
+
+	if settings is None:
+		raise TypeError("settings parameter is required")
+	mysettings = settings
+	myroot = settings["ROOT"]
+
+	if _unused is not None and _unused != mysettings["ROOT"]:
+		warnings.warn("The third parameter of the "
+			"portage.doebuild() is now unused. Use "
+			"settings['ROOT'] instead.",
+			DeprecationWarning, stacklevel=2)
+
 	if not tree:
 		writemsg("Warning: tree not specified to doebuild\n")
 		tree = "porttree"



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-18  7:22 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-18  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     dac6b249202ce69cd21a07cfd908ef31c9f595b9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 07:22:33 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 07:22:33 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dac6b249

/etc/portage/modules: warn about metadata_overlay

This module is an alias for flat_hash now, and hasn't been useful
since FEATURES=metadata-transfer was disabled by default in commit
81db3e467cd7f8bb94fcdf96d5fb4acf27bf382b.

---
 pym/portage/package/ebuild/config.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 542cfac..d49ac60 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -309,12 +309,19 @@ class config(object):
 
 			self.module_priority    = ("user", "default")
 			self.modules            = {}
-			modules_loader = KeyValuePairFileLoader(
-				os.path.join(config_root, MODULES_FILE_PATH), None, None)
+			modules_file = os.path.join(config_root, MODULES_FILE_PATH)
+			modules_loader = KeyValuePairFileLoader(modules_file, None, None)
 			modules_dict, modules_errors = modules_loader.load()
 			self.modules["user"] = modules_dict
 			if self.modules["user"] is None:
 				self.modules["user"] = {}
+			user_auxdbmodule = \
+				self.modules["user"].get("portdbapi.auxdbmodule")
+			if user_auxdbmodule is not None and \
+				user_auxdbmodule in self._module_aliases:
+				warnings.warn("'%s' is deprecated: %s" %
+				(user_auxdbmodule, modules_file))
+
 			self.modules["default"] = {
 				"portdbapi.auxdbmodule":  "portage.cache.flat_hash.database",
 			}



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-18  6:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-18  6:27 UTC (permalink / raw
  To: gentoo-commits

commit:     0c14f511444b74e4e19b4aed7af910cc8cfae8a5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 06:27:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 06:27:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0c14f511

load_best_module: tweak metadata_overlay fallback

---
 pym/portage/package/ebuild/config.py |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 2739584..542cfac 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -126,6 +126,11 @@ class config(object):
 		'PROPERTIES', 'PROVIDE', 'RDEPEND', 'SLOT',
 		'repository', 'RESTRICT', 'LICENSE',)
 
+	_module_aliases = {
+		"cache.metadata_overlay.database" : "portage.cache.flat_hash.database",
+		"portage.cache.metadata_overlay.database" : "portage.cache.flat_hash.database",
+	}
+
 	_case_insensitive_vars = special_env_vars.case_insensitive_vars
 	_default_globals = special_env_vars.default_globals
 	_env_blacklist = special_env_vars.env_blacklist
@@ -880,18 +885,16 @@ class config(object):
 		try:
 			mod = load_mod(best_mod)
 		except ImportError:
-			if not best_mod.startswith("cache."):
+			if best_mod in self._module_aliases:
+				mod = load_mod(self._module_aliases[best_mod])
+			elif not best_mod.startswith("cache."):
 				raise
 			else:
 				best_mod = "portage." + best_mod
 				try:
 					mod = load_mod(best_mod)
 				except ImportError:
-					if best_mod == "portage.cache.metadata_overlay.database":
-						best_mod = "portage.cache.flat_hash.database"
-						mod = load_mod(best_mod)
-					else:
-						raise
+					raise
 		return mod
 
 	def lock(self):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-14  6:40 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-14  6:40 UTC (permalink / raw
  To: gentoo-commits

commit:     350f7536df5528cf12baf140e71f899c439fdb3f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 14 06:40:02 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 06:40:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=350f7536

Fix inverted QA_SONAME_NO_SYMLINK logic.

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 38f012f..e479159 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1889,7 +1889,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
 			continue
 		if not is_libdir(os.path.dirname(obj)):
 			continue
-		if qa_no_symlink and qa_no_symlink.match(obj.strip(os.sep)) is None:
+		if qa_no_symlink and qa_no_symlink.match(obj.strip(os.sep)) is not None:
 			continue
 
 		obj_file_path = os.path.join(image_dir, obj.lstrip(os.sep))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-14  6:24 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-14  6:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d1499e9e3b08fd3e539f1b9a740d243bec67872c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 14 06:23:48 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 06:23:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d1499e9e

Don't generate soname symlinks for bug #387053.

The symlink is not really needed now that the QA notice has been
available for some time (testing since 2.1.10.4, and stable
since 2.1.10.11).

---
 pym/portage/package/ebuild/doebuild.py |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 6ebe133..38f012f 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1907,8 +1907,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
 	if not missing_symlinks:
 		return
 
-	qa_msg = ["QA Notice: Missing soname symlink(s) " + \
-		"will be automatically created:"]
+	qa_msg = ["QA Notice: Missing soname symlink(s):"]
 	qa_msg.append("")
 	qa_msg.extend("\t%s -> %s" % (os.path.join(
 		os.path.dirname(obj).lstrip(os.sep), soname),
@@ -1918,13 +1917,6 @@ def _post_src_install_soname_symlinks(mysettings, out):
 	for line in qa_msg:
 		eqawarn(line, key=mysettings.mycpv, out=out)
 
-	_preinst_bsdflags(mysettings)
-	for obj, soname in missing_symlinks:
-		obj_file_path = os.path.join(image_dir, obj.lstrip(os.sep))
-		sym_file_path = os.path.join(os.path.dirname(obj_file_path), soname)
-		os.symlink(os.path.basename(obj_file_path), sym_file_path)
-	_reapply_bsdflags_to_image(mysettings)
-
 def _merge_unicode_error(errors):
 	lines = []
 



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-13 20:58 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-13 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     a27f3f3058fdbdaca2bcb838aca02ffc4e32007a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 13 20:58:16 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 20:58:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a27f3f30

digestcheck: handle allow_missing for distfiles

---
 pym/portage/package/ebuild/digestcheck.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index 067aacc..3b22b1d 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -52,6 +52,8 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None, mf=None):
 			eout.ebegin(_("checking %s ;-)") % f)
 			ftype = mf.findFile(f)
 			if ftype is None:
+				if mf.allow_missing:
+					continue
 				eout.eend(1)
 				writemsg(_("\n!!! Missing digest for '%s'\n") % (f,),
 					noiselevel=-1)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-11 20:59 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-11 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d7bc4e67632e66d97d23eff3b6e1b75ce5e84e87
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 20:57:49 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 20:57:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d7bc4e67

Ensure correct IUSE in vdb for bug #386829.

---
 pym/portage/package/ebuild/doebuild.py |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index b2f8c77..156da1a 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1542,15 +1542,24 @@ def _post_src_install_chost_fix(settings):
 	"""
 	It's possible that the ebuild has changed the
 	CHOST variable, so revert it to the initial
-	setting.
+	setting. Also, revert IUSE in case it's corrupted
+	due to local environment settings like in bug #386829.
 	"""
-	if settings.get('CATEGORY') == 'virtual':
-		return
 
-	chost = settings.get('CHOST')
-	if chost:
-		write_atomic(os.path.join(settings['PORTAGE_BUILDDIR'],
-			'build-info', 'CHOST'), chost + '\n')
+	build_info_dir = os.path.join(settings['PORTAGE_BUILDDIR'], 'build-info')
+
+	for k in ('IUSE',):
+		v = settings.get(k)
+		if v is not None:
+			write_atomic(os.path.join(build_info_dir, k), v + '\n')
+
+	# The following variables are irrelevant for virtual packages.
+	if settings.get('CATEGORY') != 'virtual':
+
+		for k in ('CHOST',):
+			v = settings.get(k)
+			if v is not None:
+				write_atomic(os.path.join(build_info_dir, k), v + '\n')
 
 _vdb_use_conditional_keys = ('DEPEND', 'LICENSE', 'PDEPEND',
 	'PROPERTIES', 'PROVIDE', 'RDEPEND', 'RESTRICT',)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-10-11 17:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-10-11 17:27 UTC (permalink / raw
  To: gentoo-commits

commit:     79589ca29ecdbfafbc50b0899a51ce3f4eba1857
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 17:27:44 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 17:27:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=79589ca2

fetch: tweak space msg for bug #386797

---
 pym/portage/package/ebuild/fetch.py |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 9f66148..43597ac 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -612,18 +612,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 					elif userfetch:
 						has_space = False
 
-			if not has_space:
-				writemsg(_("!!! Insufficient space to store %s in %s\n") % \
-					(myfile, mysettings["DISTDIR"]), noiselevel=-1)
-
-				if has_space_superuser:
-					writemsg(_("!!! Insufficient privileges to use "
-						"remaining space.\n"), noiselevel=-1)
-					if userfetch:
-						writemsg(_("!!! You may set FEATURES=\"-userfetch\""
-							" in /etc/make.conf in order to fetch with\n"
-							"!!! superuser privileges.\n"), noiselevel=-1)
-
 			if distdir_writable and use_locks:
 
 				lock_kwargs = {}
@@ -727,6 +715,20 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 						os.symlink(readonly_file, myfile_path)
 						continue
 
+				# this message is shown only after we know that
+				# the file is not already fetched
+				if not has_space:
+					writemsg(_("!!! Insufficient space to store %s in %s\n") % \
+						(myfile, mysettings["DISTDIR"]), noiselevel=-1)
+
+					if has_space_superuser:
+						writemsg(_("!!! Insufficient privileges to use "
+							"remaining space.\n"), noiselevel=-1)
+						if userfetch:
+							writemsg(_("!!! You may set FEATURES=\"-userfetch\""
+								" in /etc/make.conf in order to fetch with\n"
+								"!!! superuser privileges.\n"), noiselevel=-1)
+
 				if fsmirrors and not os.path.exists(myfile_path) and has_space:
 					for mydir in fsmirrors:
 						mirror_file = os.path.join(mydir, myfile)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-28 13:47 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-28 13:47 UTC (permalink / raw
  To: gentoo-commits

commit:     1f36702dbc1ce5e565b1d6e788d2c8e88f506edc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 28 13:46:19 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 28 13:46:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1f36702d

doebuild: allow_missing_manifests AttributeError

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index bd33d91..b2f8c77 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -496,7 +496,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		not repo_config.thin_manifest and \
 		mydo not in ("digest", "manifest", "help") and \
 		not portage._doebuild_manifest_exempt_depend and \
-		not (repo_config.allow_missing_manifests and not os.path.exists(manifest_path)):
+		not (repo_config.allow_missing_manifest and not os.path.exists(manifest_path)):
 		# Always verify the ebuild checksums before executing it.
 		global _doebuild_broken_ebuilds
 



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-27  2:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-27  2:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6c6d98201812db2d4826d1a9becd9dcaee791d6c
Author:     David James <davidjames <AT> chromium <DOT> org>
AuthorDate: Tue Sep 27 00:48:09 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 01:57:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6c6d9820

Cleanup unused variables / imports reported by pyflakes.

Change-Id: I92890279dc69974da94cc9a8a5483ddd295512d4

---
 pym/portage/package/ebuild/doebuild.py         |    1 -
 pym/portage/package/ebuild/getmaskingstatus.py |    4 +---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 9939e9c..e89d77d 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -605,7 +605,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				if builddir_lock is not None:
 					builddir_lock.unlock()
 
-		restrict = set(mysettings.get('PORTAGE_RESTRICT', '').split())
 		# get possible slot information from the deps file
 		if mydo == "depend":
 			writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2)

diff --git a/pym/portage/package/ebuild/getmaskingstatus.py b/pym/portage/package/ebuild/getmaskingstatus.py
index 6eaa223..66d3db5 100644
--- a/pym/portage/package/ebuild/getmaskingstatus.py
+++ b/pym/portage/package/ebuild/getmaskingstatus.py
@@ -7,11 +7,9 @@ import sys
 
 import portage
 from portage import eapi_is_supported, _eapi_is_deprecated
-from portage.dep import match_from_list, _slot_separator, _repo_separator
 from portage.localization import _
 from portage.package.ebuild.config import config
-from portage.versions import catpkgsplit, cpv_getkey
-from _emerge.Package import Package
+from portage.versions import catpkgsplit
 
 if sys.hexversion >= 0x3000000:
 	basestring = str



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-23  0:17 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-23  0:17 UTC (permalink / raw
  To: gentoo-commits

commit:     21cd90fb1fdf8266aff8cdeb1c308eabddf190ca
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 00:17:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 00:17:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=21cd90fb

fetch: remove stray print for bug 383859

---
 pym/portage/package/ebuild/fetch.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 84b6418..9f66148 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -1040,7 +1040,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 								# from another mirror...
 								verified_ok,reason = verify_all(mysettings["DISTDIR"]+"/"+myfile, mydigests[myfile])
 								if not verified_ok:
-									print(reason)
 									writemsg(_("!!! Fetched file: %s VERIFY FAILED!\n") % myfile,
 										noiselevel=-1)
 									writemsg(_("!!! Reason: %s\n") % reason[0],



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-17  5:50 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-17  5:50 UTC (permalink / raw
  To: gentoo-commits

commit:     38af3b5daa12ae1212850cc6722081cbe13e8a71
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 05:50:36 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 05:50:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=38af3b5d

config: quote PORTDIR_OVERLAY paths more

This fixes the issue in bug #383269, comment #3.

---
 pym/portage/package/ebuild/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index bf88894..73af066 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -511,11 +511,11 @@ class config(object):
 
 			new_ov = []
 			if portdir_overlay:
-				whitespace_re = re.compile(r"\s")
+				shell_quote_re = re.compile(r"[\s\\\"'$`]")
 				for ov in portdir_overlay:
 					ov = normalize_path(ov)
 					if os.path.isdir(ov):
-						if whitespace_re.search(ov) is not None:
+						if shell_quote_re.search(ov) is not None:
 							ov = portage._shell_quote(ov)
 						new_ov.append(ov)
 					else:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-15  5:34 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-15  5:34 UTC (permalink / raw
  To: gentoo-commits

commit:     bcf26c6b4ad3e757b037f2c12c64a0406f70bf41
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 05:34:38 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 05:34:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bcf26c6b

doebuild: avoid redundant distfiles checks

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index ba7ebc3..427589a 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -860,7 +860,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 					return 0
 				return 1
 
-		if mydo == "fetch":
+		if need_distfiles:
 			# Files are already checked inside fetch(),
 			# so do not check them again.
 			checkme = []



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-15  5:31 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-15  5:31 UTC (permalink / raw
  To: gentoo-commits

commit:     01d4dde5a17648b8004e3633bf11ed945a0fa796
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 05:30:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 05:30:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=01d4dde5

digestcheck: only show relevant msgs for thin

---
 pym/portage/package/ebuild/digestcheck.py |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index 38a3eba..33f9cd6 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -38,15 +38,18 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None, mf=None):
 	eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1"
 	try:
 		if strict and "PORTAGE_PARALLEL_FETCHONLY" not in mysettings:
-			eout.ebegin(_("checking ebuild checksums ;-)"))
-			mf.checkTypeHashes("EBUILD")
-			eout.eend(0)
-			eout.ebegin(_("checking auxfile checksums ;-)"))
-			mf.checkTypeHashes("AUX")
-			eout.eend(0)
-			eout.ebegin(_("checking miscfile checksums ;-)"))
-			mf.checkTypeHashes("MISC", ignoreMissingFiles=True)
-			eout.eend(0)
+			if mf.fhashdict.get("EBUILD"):
+				eout.ebegin(_("checking ebuild checksums ;-)"))
+				mf.checkTypeHashes("EBUILD")
+				eout.eend(0)
+			if mf.fhashdict.get("AUX"):
+				eout.ebegin(_("checking auxfile checksums ;-)"))
+				mf.checkTypeHashes("AUX")
+				eout.eend(0)
+			if mf.fhashdict.get("MISC"):
+				eout.ebegin(_("checking miscfile checksums ;-)"))
+				mf.checkTypeHashes("MISC", ignoreMissingFiles=True)
+				eout.eend(0)
 		for f in myfiles:
 			eout.ebegin(_("checking %s ;-)") % f)
 			ftype = mf.findFile(f)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-15  2:44 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-15  2:44 UTC (permalink / raw
  To: gentoo-commits

commit:     7b9709d96425606366b56b33168544a6897d69b0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 02:44:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 02:44:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7b9709d9

digestcheck: remove empty/missing Manifest checks

These checks never really needed, and they are not valid for thin
manifests or allow-missing-manifests.

---
 pym/portage/package/ebuild/digestcheck.py |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index 466fd05..38a3eba 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -30,32 +30,10 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None, mf=None):
 		return 1
 	allow_missing = "allow-missing-manifests" in mysettings.features
 	pkgdir = mysettings["O"]
-	manifest_path = os.path.join(pkgdir, "Manifest")
-	if not os.path.exists(manifest_path):
-		if allow_missing:
-			return 1
-		writemsg(_("!!! Manifest file not found: '%s'\n") % manifest_path,
-			noiselevel=-1)
-		if strict:
-			return 0
-		else:
-			return 1
 	if mf is None:
 		mf = mysettings.repositories.get_repo_for_location(
 			os.path.dirname(os.path.dirname(pkgdir)))
 		mf = mf.load_manifest(pkgdir, mysettings["DISTDIR"])
-	manifest_empty = True
-	for d in mf.fhashdict.values():
-		if d:
-			manifest_empty = False
-			break
-	if manifest_empty:
-		writemsg(_("!!! Manifest is empty: '%s'\n") % manifest_path,
-			noiselevel=-1)
-		if strict:
-			return 0
-		else:
-			return 1
 	eout = EOutput()
 	eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1"
 	try:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-14 17:09 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-14 17:09 UTC (permalink / raw
  To: gentoo-commits

commit:     3db6f6e783e5bef8240c04b8a6c6a8b7983572a5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 17:08:52 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 17:08:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3db6f6e7

digestgen: remove duplicate 'mytree' variables

---
 pym/portage/package/ebuild/digestgen.py |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 325fc52..d4146dd 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -17,7 +17,6 @@ from portage.dep import use_reduce
 from portage.exception import InvalidDependString, FileNotFound, \
 	PermissionDenied, PortagePackageException
 from portage.localization import _
-from portage.manifest import Manifest
 from portage.output import colorize
 from portage.package.ebuild.fetch import fetch
 from portage.util import writemsg, writemsg_stdout
@@ -108,8 +107,6 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					continue
 
 		if missing_files:
-				mytree = os.path.realpath(os.path.dirname(
-					os.path.dirname(mysettings["O"])))
 				for myfile in missing_files:
 					uris = set()
 					all_restrict = set()
@@ -189,8 +186,6 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					os.path.join(mysettings["DISTDIR"], filename)):
 					auto_assumed.append(filename)
 			if auto_assumed:
-				mytree = os.path.realpath(
-					os.path.dirname(os.path.dirname(mysettings["O"])))
 				cp = os.path.sep.join(mysettings["O"].split(os.path.sep)[-2:])
 				pkgs = myportdb.cp_list(cp, mytree=mytree)
 				pkgs.sort()



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-14 16:23 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-14 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     275134399b75d5f6740954c942dbb3921b9828e8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 16:23:18 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 16:23:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=27513439

digestgen: handle get_repo_for_location KeyError

---
 pym/portage/package/ebuild/digestgen.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 7b58972..325fc52 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -52,7 +52,13 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 				del e
 				return 0
 		mytree = os.path.dirname(os.path.dirname(mysettings["O"]))
-		mf = mysettings.repositories.get_repo_for_location(mytree)
+		try:
+			mf = mysettings.repositories.get_repo_for_location(mytree)
+		except KeyError:
+			# backward compatibility
+			mytree = os.path.realpath(mytree)
+			mf = mysettings.repositories.get_repo_for_location(mytree)
+
 		mf = mf.load_manifest(mysettings["O"], mysettings["DISTDIR"],
 			fetchlist_dict=fetchlist_dict)
 		# Don't require all hashes since that can trigger excessive



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-13  5:01 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-13  5:01 UTC (permalink / raw
  To: gentoo-commits

commit:     3c59510e894e39f105e3c72c444021deeeb7e062
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 13 05:01:08 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 05:01:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3c59510e

_validate_deps: pass myrepo to aux_get

---
 pym/portage/package/ebuild/doebuild.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index b8bcad2..ba7ebc3 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1184,7 +1184,8 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
 	all_keys.add("SRC_URI")
 	all_keys = tuple(all_keys)
 	metadata = dict(zip(all_keys,
-		mydbapi.aux_get(mysettings.mycpv, all_keys)))
+		mydbapi.aux_get(mysettings.mycpv, all_keys,
+		myrepo=mysettings.get("PORTAGE_REPO_NAME"))))
 
 	class FakeTree(object):
 		def __init__(self, mydb):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-13  4:33 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-13  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     48a2edbf0f0677cc97bae388cc391b563c8e4859
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 13 04:33:01 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 04:33:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=48a2edbf

doebuild: support allow-missing and thin manifest

---
 pym/portage/package/ebuild/doebuild.py |   36 ++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 51b2dbc..b8bcad2 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -50,7 +50,6 @@ from portage.exception import DigestException, FileNotFound, \
 	IncorrectParameter, InvalidDependString, PermissionDenied, \
 	UnsupportedAPIException
 from portage.localization import _
-from portage.manifest import Manifest
 from portage.output import style_to_ansi_code
 from portage.package.ebuild.prepare_build_dirs import prepare_build_dirs
 from portage.util import apply_recursive_permissions, \
@@ -483,21 +482,28 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		return 1
 
 	global _doebuild_manifest_cache
+	pkgdir = os.path.dirname(myebuild)
+	manifest_path = os.path.join(pkgdir, "Manifest")
+	allow_missing_manifests = "allow-missing-manifests" in mysettings.features
+	if tree == "porttree":
+		repo_config = mysettings.repositories.get_repo_for_location(
+			os.path.dirname(os.path.dirname(pkgdir)))
+	else:
+		repo_config = None
 	mf = None
 	if "strict" in features and \
 		"digest" not in features and \
 		tree == "porttree" and \
+		not repo_config.thin_manifest and \
 		mydo not in ("digest", "manifest", "help") and \
-		not portage._doebuild_manifest_exempt_depend:
+		not portage._doebuild_manifest_exempt_depend and \
+		not (allow_missing_manifests and not os.path.exists(manifest_path)):
 		# Always verify the ebuild checksums before executing it.
 		global _doebuild_broken_ebuilds
 
 		if myebuild in _doebuild_broken_ebuilds:
 			return 1
 
-		pkgdir = os.path.dirname(myebuild)
-		manifest_path = os.path.join(pkgdir, "Manifest")
-
 		# Avoid checking the same Manifest several times in a row during a
 		# regen with an empty cache.
 		if _doebuild_manifest_cache is None or \
@@ -508,9 +514,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				out.eerror(_("Manifest not found for '%s'") % (myebuild,))
 				_doebuild_broken_ebuilds.add(myebuild)
 				return 1
-			mf = mysettings.repositories.get_repo_for_location(
-				os.path.dirname(os.path.dirname(pkgdir)))
-			mf = mf.load_manifest(pkgdir, mysettings["DISTDIR"])
+			mf = repo_config.load_manifest(pkgdir, mysettings["DISTDIR"])
 
 		else:
 			mf = _doebuild_manifest_cache
@@ -518,10 +522,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		try:
 			mf.checkFileHashes("EBUILD", os.path.basename(myebuild))
 		except KeyError:
-			out = portage.output.EOutput()
-			out.eerror(_("Missing digest for '%s'") % (myebuild,))
-			_doebuild_broken_ebuilds.add(myebuild)
-			return 1
+			if not (allow_missing_manifests and
+				os.path.basename(myebuild) not in mf.fhashdict["EBUILD"]):
+				out = portage.output.EOutput()
+				out.eerror(_("Missing digest for '%s'") % (myebuild,))
+				_doebuild_broken_ebuilds.add(myebuild)
+				return 1
 		except FileNotFound:
 			out = portage.output.EOutput()
 			out.eerror(_("A file listed in the Manifest "
@@ -541,7 +547,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		if mf.getFullname() in _doebuild_broken_manifests:
 			return 1
 
-		if mf is not _doebuild_manifest_cache:
+		if mf is not _doebuild_manifest_cache and not allow_missing_manifests:
 
 			# Make sure that all of the ebuilds are
 			# actually listed in the Manifest.
@@ -558,8 +564,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 					_doebuild_broken_manifests.add(manifest_path)
 					return 1
 
-			# Only cache it if the above stray files test succeeds.
-			_doebuild_manifest_cache = mf
+		# We cache it only after all above checks succeed.
+		_doebuild_manifest_cache = mf
 
 	logfile=None
 	builddir_lock = None



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-12  1:38 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-12  1:38 UTC (permalink / raw
  To: gentoo-commits

commit:     324628c70352d3aad4c32c51ce254964e5b19554
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 01:38:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 01:38:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=324628c7

config: set USERLAND if unset

---
 pym/portage/package/ebuild/config.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 8cca0ef..bf88894 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -8,6 +8,7 @@ __all__ = [
 import copy
 from itertools import chain
 import logging
+import platform
 import re
 import sys
 import warnings
@@ -687,6 +688,18 @@ class config(object):
 				self["CBUILD"] = self["CHOST"]
 				self.backup_changes("CBUILD")
 
+			if "USERLAND" not in self:
+				# Set default USERLAND so that our test cases can assume that
+				# it's always set. This allows isolated-functions.sh to avoid
+				# calling uname -s when sourced.
+				system = platform.system()
+				if system is not None and \
+					(system.endswith("BSD") or system == "DragonFly"):
+					self["USERLAND"] = "BSD"
+				else:
+					self["USERLAND"] = "GNU"
+				self.backup_changes("USERLAND")
+
 			self["PORTAGE_BIN_PATH"] = PORTAGE_BIN_PATH
 			self.backup_changes("PORTAGE_BIN_PATH")
 			self["PORTAGE_PYM_PATH"] = PORTAGE_PYM_PATH



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-09-01  6:50 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-09-01  6:50 UTC (permalink / raw
  To: gentoo-commits

commit:     22c76160f6a905500c7d217efeae8c58a8298581
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 06:48:25 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 06:48:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=22c76160

doebuild_environment: include EPREFIX in ED

---
 pym/portage/package/ebuild/doebuild.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 45b2863..7b3561e 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -268,7 +268,9 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
 
 	# Prefix forward compatability
-	mysettings["ED"] = mysettings["D"]
+	eprefix_lstrip = mysettings["EPREFIX"].lstrip(os.sep)
+	mysettings["ED"] = os.path.join(
+		mysettings["D"], eprefix_lstrip).rstrip(os.sep) + os.sep
 
 	mysettings["PORTAGE_BASHRC"] = os.path.join(
 		mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_FILE)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-31  0:49 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-31  0:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c7ff6c61e86127068ba6abe6aaa094e56c2d7555
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 31 00:49:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Aug 31 00:49:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c7ff6c61

doebuild: only check .unpacked for porttree

---
 pym/portage/package/ebuild/doebuild.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 2ab6796..45b2863 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -684,7 +684,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		alist = set(mysettings.configdict["pkg"].get("A", "").split())
 
 		unpacked = False
-		if "unpack" not in phases_to_run:
+		if tree != "porttree":
+			pass
+		elif "unpack" not in phases_to_run:
 			unpacked = os.path.exists(os.path.join(
 				mysettings["PORTAGE_BUILDDIR"], ".unpacked"))
 		else:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-30 17:03 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-30 17:03 UTC (permalink / raw
  To: gentoo-commits

commit:     77896f08ed12a93ff6ee8a657ae11501cc2dbc87
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 17:03:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 17:03:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=77896f08

doebuild: check distfiles digests less often

If the unpack phase is not going to be executed as a dependency, then
we can simply skip the distfiles digest checks if the unpack phase is
already marked complete via $PORTAGE_BUILDDIR/.unpacked.

---
 pym/portage/package/ebuild/doebuild.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 92d73e5..2ab6796 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -684,7 +684,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		alist = set(mysettings.configdict["pkg"].get("A", "").split())
 
 		unpacked = False
-		if "unpack" in phases_to_run:
+		if "unpack" not in phases_to_run:
+			unpacked = os.path.exists(os.path.join(
+				mysettings["PORTAGE_BUILDDIR"], ".unpacked"))
+		else:
 			try:
 				workdir_st = os.stat(mysettings["WORKDIR"])
 			except OSError:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-29 18:04 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2011-08-29 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     abfaa01acee62306b234efd56e8ddf5b0fd583f9
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Mon Aug 29 18:03:29 2011 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 18:03:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=abfaa01a

Mark some messages for translation.

---
 pym/portage/package/ebuild/doebuild.py |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 0e80917..92d73e5 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -693,8 +693,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				newstuff = False
 				if not os.path.exists(os.path.join(
 					mysettings["PORTAGE_BUILDDIR"], ".unpacked")):
-					writemsg_stdout(
-						">>> Not marked as unpacked; recreating WORKDIR...\n")
+					writemsg_stdout(_(
+						">>> Not marked as unpacked; recreating WORKDIR...\n"))
 					newstuff = True
 				else:
 					for x in alist:
@@ -707,8 +707,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 							x_st = None
 
 						if x_st is None or x_st.st_mtime > workdir_st.st_mtime:
-							writemsg_stdout(">>> Timestamp of "
-								"%s has changed; recreating WORKDIR...\n" % x)
+							writemsg_stdout(_(">>> Timestamp of "
+								"%s has changed; recreating WORKDIR...\n") % x)
 							newstuff = True
 							break
 
@@ -726,7 +726,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 							builddir_lock.unlock()
 							builddir_lock = None
 				else:
-					writemsg_stdout(">>> WORKDIR is up-to-date, keeping...\n")
+					writemsg_stdout(_(">>> WORKDIR is up-to-date, keeping...\n"))
 					unpacked = True
 
 		# Build directory creation isn't required for any of these.
@@ -1362,11 +1362,11 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
 		check_file = os.path.join(
 			mysettings["PORTAGE_BUILDDIR"], ".%sed" % mydo.rstrip('e'))
 		if os.path.exists(check_file):
-			writemsg_stdout(">>> It appears that "
-				"'%s' has already executed for '%s'; skipping.\n" %
-				(mydo, mysettings["PF"]))
-			writemsg_stdout(">>> Remove '%s' to force %s.\n" %
-				(check_file, mydo))
+			writemsg_stdout(_(">>> It appears that "
+				"'%(action)s' has already executed for '%(pkg)s'; skipping.\n") %
+				{"action":mydo, "pkg":mysettings["PF"]})
+			writemsg_stdout(_(">>> Remove '%(file)s' to force %(action)s.\n") %
+				{"file":check_file, "action":mydo})
 			return os.EX_OK
 
 	return _spawn_phase(mydo, mysettings,



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-29  0:05 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-29  0:05 UTC (permalink / raw
  To: gentoo-commits

commit:     5bc6b9c8767c9a9bea511d7ece98f54e8a873b47
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 00:04:47 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 00:04:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5bc6b9c8

spawnebuild: skip previously executed phases

This simply checks of $PORTAGE_BUILDDIR/.${EBUILD_PHASE%e}ed and skips
the phase like ebuild.sh would. It preserves a special case for the
install phase with FEATURES=noauto, so that dyn_install in ebuild.sh
continues to work the same for this case.. Also, note that commit
ae9b6cb513c7b29376caecf3b4e52aac452e2b93 preserves the automatic
"recreating WORKDIR" behavior that used to be implemented in
dyn_unpack.

---
 pym/portage/package/ebuild/doebuild.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index a95a418..0e80917 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1358,6 +1358,17 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
 	if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
 		return os.EX_OK
 
+	if not (mydo == "install" and "noauto" in mysettings.features):
+		check_file = os.path.join(
+			mysettings["PORTAGE_BUILDDIR"], ".%sed" % mydo.rstrip('e'))
+		if os.path.exists(check_file):
+			writemsg_stdout(">>> It appears that "
+				"'%s' has already executed for '%s'; skipping.\n" %
+				(mydo, mysettings["PF"]))
+			writemsg_stdout(">>> Remove '%s' to force %s.\n" %
+				(check_file, mydo))
+			return os.EX_OK
+
 	return _spawn_phase(mydo, mysettings,
 		actionmap=actionmap, logfile=logfile,
 		fd_pipes=fd_pipes, returnpid=returnpid)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-28 21:05 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-28 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     566a9776d3ca10ccf1b646fba154fa71ccaf4ff6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 28 21:04:41 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Aug 28 21:04:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=566a9776

Fix possible NameError in finally block.

---
 pym/portage/package/ebuild/doebuild.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 47b4ec4..c252e86 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1691,6 +1691,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
 	needed_filename = os.path.join(mysettings["PORTAGE_BUILDDIR"],
 		"build-info", "NEEDED.ELF.2")
 
+	f = None
 	try:
 		f = io.open(_unicode_encode(needed_filename,
 			encoding=_encodings['fs'], errors='strict'),
@@ -1702,7 +1703,8 @@ def _post_src_install_soname_symlinks(mysettings, out):
 			raise
 		return
 	finally:
-		f.close()
+		if f is not None:
+			f.close()
 
 	libpaths = set(portage.util.getlibpaths(
 		mysettings["ROOT"], env=mysettings))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-28 19:55 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2011-08-28 19:55 UTC (permalink / raw
  To: gentoo-commits

commit:     4afee825db23000b28a226b7b488956d4eb8f708
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Sun Aug 28 19:54:23 2011 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org>
CommitDate: Sun Aug 28 19:54:23 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4afee825

Fix "ResourceWarning: unclosed file" with Python 3.2.

---
 pym/portage/package/ebuild/doebuild.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index aa9218c..47b4ec4 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1692,14 +1692,17 @@ def _post_src_install_soname_symlinks(mysettings, out):
 		"build-info", "NEEDED.ELF.2")
 
 	try:
-		lines = io.open(_unicode_encode(needed_filename,
+		f = io.open(_unicode_encode(needed_filename,
 			encoding=_encodings['fs'], errors='strict'),
 			mode='r', encoding=_encodings['repo.content'],
-			errors='replace').readlines()
+			errors='replace')
+		lines = f.readlines()
 	except IOError as e:
 		if e.errno not in (errno.ENOENT, errno.ESTALE):
 			raise
 		return
+	finally:
+		f.close()
 
 	libpaths = set(portage.util.getlibpaths(
 		mysettings["ROOT"], env=mysettings))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-13 12:55 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-13 12:55 UTC (permalink / raw
  To: gentoo-commits

commit:     2084e692b0f36d7f3fe8f2c3a6cb8c540abcc665
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 13 12:54:21 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 12:54:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2084e692

config: blacklist vars loaded from profile.env

---
 pym/portage/package/ebuild/config.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index a591c9a..8cca0ef 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -208,6 +208,7 @@ class config(object):
 			self.repositories = clone.repositories
 			self._iuse_implicit_match = clone._iuse_implicit_match
 			self._non_user_variables = clone._non_user_variables
+			self._env_d_blacklist = clone._env_d_blacklist
 			self._repo_make_defaults = clone._repo_make_defaults
 			self.usemask = clone.usemask
 			self.useforce = clone.useforce
@@ -439,6 +440,14 @@ class config(object):
 			non_user_variables = frozenset(non_user_variables)
 			self._non_user_variables = non_user_variables
 
+			self._env_d_blacklist = frozenset(chain(
+				profile_only_variables,
+				self._env_blacklist,
+			))
+			env_d = self.configdict["env.d"]
+			for k in self._env_d_blacklist:
+				env_d.pop(k, None)
+
 			for k in profile_only_variables:
 				self.mygcfg.pop(k, None)
 
@@ -1702,6 +1711,8 @@ class config(object):
 		env_d = getconfig(env_d_filename, expand=False)
 		if env_d:
 			# env_d will be None if profile.env doesn't exist.
+			for k in self._env_d_blacklist:
+				env_d.pop(k, None)
 			self.configdict["env.d"].update(env_d)
 
 	def regenerate(self, useonly=0, use_cache=None):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-09  0:14 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-09  0:14 UTC (permalink / raw
  To: gentoo-commits

commit:     8a85160f4833e3f02470961fc2e05ec93f466566
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  9 00:14:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug  9 00:14:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8a85160f

_check_temp_dir: check for 'portage' symlink

This will fix bug #378403.

---
 pym/portage/package/ebuild/doebuild.py |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 49b67ac..a710e09 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -944,10 +944,31 @@ def _check_temp_dir(settings):
 	# as some people use a separate PORTAGE_TMPDIR mount
 	# we prefer that as the checks below would otherwise be pointless
 	# for those people.
-	if os.path.exists(os.path.join(settings["PORTAGE_TMPDIR"], "portage")):
-		checkdir = os.path.join(settings["PORTAGE_TMPDIR"], "portage")
+	tmpdir = os.path.realpath(settings["PORTAGE_TMPDIR"])
+	if os.path.exists(os.path.join(tmpdir, "portage")):
+		checkdir = os.path.realpath(os.path.join(tmpdir, "portage"))
+		if ("sandbox" in settings.features or
+			"usersandox" in settings.features) and \
+			not checkdir.startswith(tmpdir + os.sep):
+			msg = _("The 'portage' subdirectory of the directory "
+			"referenced by the PORTAGE_TMPDIR variable appears to be "
+			"a symlink. In order to avoid sandbox violations (see bug "
+			"#378379), you must adjust PORTAGE_TMPDIR instead of using "
+			"the symlink located at '%s'. A suitable PORTAGE_TMPDIR "
+			"setting would be '%s'.") % \
+			(os.path.join(tmpdir, "portage"), checkdir)
+			lines = []
+			lines.append("")
+			lines.append("")
+			lines.extend(wrap(msg, 72))
+			lines.append("")
+			for line in lines:
+				if line:
+					line = "!!! %s" % (line,)
+				writemsg("%s\n" % (line,), noiselevel=-1)
+			return 1
 	else:
-		checkdir = settings["PORTAGE_TMPDIR"]
+		checkdir = tmpdir
 
 	if not os.access(checkdir, os.W_OK):
 		writemsg(_("%s is not writable.\n"



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-08-07  5:59 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-08-07  5:59 UTC (permalink / raw
  To: gentoo-commits

commit:     a7abc7529df54ee300d56a7d33cc87b5af0e298b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  7 05:59:26 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Aug  7 05:59:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7abc752

fetch: handle non-essential statvfs failure

---
 pym/portage/package/ebuild/fetch.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 2ae1fe8..5cbbf87 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -580,8 +580,17 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 		else:
 			# check if there is enough space in DISTDIR to completely store myfile
 			# overestimate the filesize so we aren't bitten by FS overhead
+			vfs_stat = None
 			if size is not None and hasattr(os, "statvfs"):
-				vfs_stat = os.statvfs(mysettings["DISTDIR"])
+				try:
+					vfs_stat = os.statvfs(mysettings["DISTDIR"])
+				except OSError as e:
+					writemsg_level("!!! statvfs('%s'): %s\n" %
+						(mysettings["DISTDIR"], e),
+						noiselevel=-1, level=logging.ERROR)
+					del e
+
+			if vfs_stat is not None:
 				try:
 					mysize = os.stat(myfile_path).st_size
 				except OSError as e:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-27  9:53 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-27  9:53 UTC (permalink / raw
  To: gentoo-commits

commit:     9a31128ea29f2fb3f4bde03273d671a0e01332bf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 27 09:53:40 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 09:53:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9a31128e

config: fix AttributeError: 'NoneType' errors

This is a regression from commit
1fdeb78d08bac14f3f999f112499d179a87cf342 and it can only be triggered
when repo-level package.use is present.

---
 pym/portage/package/ebuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 8b1a1a1..a8c6ad6 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1148,7 +1148,7 @@ class config(object):
 					d = d.copy()
 				cpdict = self._use_manager._repo_puse_dict.get(repo, {}).get(cp)
 				if cpdict:
-					repo_puse = ordered_by_atom_specificity(cpdict, pkg)
+					repo_puse = ordered_by_atom_specificity(cpdict, cpv_slot)
 					if repo_puse:
 						for x in repo_puse:
 							d["USE"] = d.get("USE", "") + " " + " ".join(x)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-14 21:54 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-14 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     382846da2f7c30e352a55c91131fd37eef7174b3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 21:53:48 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 21:53:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=382846da

Set PORTAGE_REPO_NAME for depend phase.

---
 pym/portage/package/ebuild/doebuild.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index fb29b00..49b67ac 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -212,6 +212,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		repo_info = mydbapi._repo_info[mytree]
 		mysettings['PORTDIR'] = repo_info.portdir
 		mysettings['PORTDIR_OVERLAY'] = repo_info.portdir_overlay
+		mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"] = repo_info.name
 
 	mysettings["PORTDIR"] = os.path.realpath(mysettings["PORTDIR"])
 	mysettings["DISTDIR"] = os.path.realpath(mysettings["DISTDIR"])



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-14  1:31 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-14  1:31 UTC (permalink / raw
  To: gentoo-commits

commit:     dda534456c78a4927ad5c92352d9a5b9a7071923
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 01:31:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 01:31:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dda53445

debuild: pass manifest to digestcheck()

This allows us to avoid parsing the Manifest twice.

---
 pym/portage/package/ebuild/digestcheck.py |    5 +++--
 pym/portage/package/ebuild/doebuild.py    |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index 21cadc3..1e34b14 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -12,7 +12,7 @@ from portage.manifest import Manifest
 from portage.output import EOutput
 from portage.util import writemsg
 
-def digestcheck(myfiles, mysettings, strict=False, justmanifest=None):
+def digestcheck(myfiles, mysettings, strict=False, justmanifest=None, mf=None):
 	"""
 	Verifies checksums. Assumes all files have been downloaded.
 	@rtype: int
@@ -40,7 +40,8 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None):
 			return 0
 		else:
 			return 1
-	mf = Manifest(pkgdir, mysettings["DISTDIR"])
+	if mf is None:
+		mf = Manifest(pkgdir, mysettings["DISTDIR"])
 	manifest_empty = True
 	for d in mf.fhashdict.values():
 		if d:

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index e63c0e5..fb29b00 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -816,7 +816,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
 		# See above comment about fetching only when needed
 		if tree == 'porttree' and \
-			not digestcheck(checkme, mysettings, "strict" in features):
+			not digestcheck(checkme, mysettings, "strict" in features, mf=mf):
 			return 1
 
 		if mydo == "fetch":



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-14  1:25 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-14  1:25 UTC (permalink / raw
  To: gentoo-commits

commit:     224cb2be2a11270941742a8b08390767b0056d6c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 01:24:49 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 01:24:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=224cb2be

doebuild: discard cached manifest when necessary

When we call digestgen(), it can regenerate our distfiles digests and
we don't wan to cache stale values in this case.

---
 pym/portage/package/ebuild/doebuild.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 8e7515c..e63c0e5 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -478,6 +478,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 			noiselevel=-1)
 		return 1
 
+	global _doebuild_manifest_cache
 	mf = None
 	if "strict" in features and \
 		"digest" not in features and \
@@ -485,7 +486,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 		mydo not in ("digest", "manifest", "help") and \
 		not portage._doebuild_manifest_exempt_depend:
 		# Always verify the ebuild checksums before executing it.
-		global _doebuild_manifest_cache, _doebuild_broken_ebuilds
+		global _doebuild_broken_ebuilds
 
 		if myebuild in _doebuild_broken_ebuilds:
 			return 1
@@ -793,14 +794,20 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
 		try:
 			if mydo == "manifest":
+				mf = None
+				_doebuild_manifest_cache = None
 				return not digestgen(mysettings=mysettings, myportdb=mydbapi)
 			elif mydo == "digest":
+				mf = None
+				_doebuild_manifest_cache = None
 				return not digestgen(mysettings=mysettings, myportdb=mydbapi)
 			elif mydo != 'fetch' and \
 				"digest" in mysettings.features:
 				# Don't do this when called by emerge or when called just
 				# for fetch (especially parallel-fetch) since it's not needed
 				# and it can interfere with parallel tasks.
+				mf = None
+				_doebuild_manifest_cache = None
 				digestgen(mysettings=mysettings, myportdb=mydbapi)
 		except PermissionDenied as e:
 			writemsg(_("!!! Permission Denied: %s\n") % (e,), noiselevel=-1)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-14  0:57 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-14  0:57 UTC (permalink / raw
  To: gentoo-commits

commit:     d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 00:56:57 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 00:56:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d85b7e5c

debuild: pass dist digests to fetch()

This allows us to avoid parsing the Manifest twice.

---
 pym/portage/package/ebuild/doebuild.py |    7 ++++++-
 pym/portage/package/ebuild/fetch.py    |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 1849af9..8e7515c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -478,6 +478,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 			noiselevel=-1)
 		return 1
 
+	mf = None
 	if "strict" in features and \
 		"digest" not in features and \
 		tree == "porttree" and \
@@ -765,8 +766,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 			else:
 				fetchme = alist
 
+			dist_digests = None
+			if mf is not None:
+				dist_digests = mf.getTypeDigests("DIST")
 			if not fetch(fetchme, mysettings, listonly=listonly,
-				fetchonly=fetchonly, allow_missing_digests=True):
+				fetchonly=fetchonly, allow_missing_digests=True,
+				digests=dist_digests):
 				spawn_nofetch(mydbapi, myebuild, settings=mysettings)
 				if listonly:
 					# The convention for listonly mode is to report

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 46d77cf..2ae1fe8 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -358,7 +358,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 	if digests is None and not (pkgdir is None or skip_manifest):
 		mydigests = Manifest(
 			pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
-	elif digests is None:
+	elif digests is None or skip_manifest:
 		# no digests because fetch was not called for a specific package
 		mydigests = {}
 	else:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-14  0:37 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-14  0:37 UTC (permalink / raw
  To: gentoo-commits

commit:     f1d21db028b643c9d6a85afb2dfd6acb35ea52a1
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 00:36:24 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 00:36:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f1d21db0

Revert "ebuild(1): allow-missing-manifests for fetch"

This reverts commit 62712db56bb863b4eb0a9d9c52e7b2c3ad38df66.

This code already defaulted to the allow-missing-manifests behavior,
since the fetch() allow_missing_digests argument default is true. By
making the argument conditional on allow-missing-manifests, it changed
the behavior in the default case where allow-missing-manifests is
disabled.

---
 pym/portage/package/ebuild/doebuild.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 26afbc2..1849af9 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -764,11 +764,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				fetchme = aalist
 			else:
 				fetchme = alist
-			allow_missing_manifests = \
-				"allow-missing-manifests" in mysettings.features
+
 			if not fetch(fetchme, mysettings, listonly=listonly,
-				fetchonly=fetchonly,
-				allow_missing_digests=allow_missing_manifests):
+				fetchonly=fetchonly, allow_missing_digests=True):
 				spawn_nofetch(mydbapi, myebuild, settings=mysettings)
 				if listonly:
 					# The convention for listonly mode is to report



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-13 17:08 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-13 17:08 UTC (permalink / raw
  To: gentoo-commits

commit:     e25079fa0e74d9a19788ffb27d9fc9e67f44e11f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 17:05:55 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 17:05:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e25079fa

fetch: fix ebuild --skip-manifest behavior

This should fix "Insufficient data for checksum verification" errors
triggered by ebuild --skip-manifest.

---
 pym/portage/package/ebuild/fetch.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 658b3eb..46d77cf 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -352,6 +352,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 			mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x]
 
 	skip_manifest = mysettings.get("EBUILD_SKIP_MANIFEST") == "1"
+	if skip_manifest:
+		allow_missing_digests = True
 	pkgdir = mysettings.get("O")
 	if digests is None and not (pkgdir is None or skip_manifest):
 		mydigests = Manifest(



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-12 23:40 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-12 23:40 UTC (permalink / raw
  To: gentoo-commits

commit:     c487a4724d2f113da69fa7997e534ee8fd4d469c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 12 23:38:54 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jul 12 23:38:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c487a472

BUILD_TIME: use string format op for time.time()

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index af67e4e..26afbc2 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1593,7 +1593,7 @@ def _post_src_install_uid_fix(mysettings, out):
 	io.open(_unicode_encode(os.path.join(build_info_dir,
 		'BUILD_TIME'), encoding=_encodings['fs'], errors='strict'),
 		mode='w', encoding=_encodings['repo.content'],
-		errors='strict').write(_unicode_decode(str(int(time.time())) + '\n'))
+		errors='strict').write(_unicode_decode("%.0f\n" % (time.time(),)))
 
 	use = frozenset(mysettings['PORTAGE_USE'].split())
 	for k in _vdb_use_conditional_keys:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-12 20:04 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-12 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     34b421c22cf2cc0a91bf9564e893ef0361ce5b5d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 12 20:04:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jul 12 20:04:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=34b421c2

Use explicit 'mode' keyword arg with io.open().

---
 pym/portage/package/ebuild/doebuild.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 53a3f9a..af67e4e 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1587,12 +1587,12 @@ def _post_src_install_uid_fix(mysettings, out):
 
 	io.open(_unicode_encode(os.path.join(build_info_dir,
 		'SIZE'), encoding=_encodings['fs'], errors='strict'),
-		'w', encoding=_encodings['repo.content'],
+		mode='w', encoding=_encodings['repo.content'],
 		errors='strict').write(_unicode_decode(str(size) + '\n'))
 
 	io.open(_unicode_encode(os.path.join(build_info_dir,
 		'BUILD_TIME'), encoding=_encodings['fs'], errors='strict'),
-		'w', encoding=_encodings['repo.content'],
+		mode='w', encoding=_encodings['repo.content'],
 		errors='strict').write(_unicode_decode(str(int(time.time())) + '\n'))
 
 	use = frozenset(mysettings['PORTAGE_USE'].split())
@@ -1650,7 +1650,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
 	try:
 		lines = io.open(_unicode_encode(needed_filename,
 			encoding=_encodings['fs'], errors='strict'),
-			'r', encoding=_encodings['repo.content'],
+			mode='r', encoding=_encodings['repo.content'],
 			errors='replace').readlines()
 	except IOError as e:
 		if e.errno not in (errno.ENOENT, errno.ESTALE):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-11 16:22 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-11 16:22 UTC (permalink / raw
  To: gentoo-commits

commit:     002882cc5a936f2e111bfc6f342fb1f5987f68ed
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 16:22:37 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 16:22:37 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=002882cc

prepare_build_dirs: copy logdir group permissions

The gid of PORT_LOGDIR is copied to all subdirectories, along with
0x2070 mode bits if present.

---
 pym/portage/package/ebuild/prepare_build_dirs.py |   43 +++++++++++++++++-----
 1 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 5153190..de1dc93 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -16,7 +16,7 @@ from portage.exception import DirectoryNotFound, FileNotFound, \
 from portage.localization import _
 from portage.output import colorize
 from portage.util import apply_recursive_permissions, \
-	apply_secpass_permissions, ensure_dirs, writemsg
+	apply_secpass_permissions, ensure_dirs, normalize_path, writemsg
 
 def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
 	"""
@@ -303,6 +303,7 @@ def _prepare_workdir(mysettings):
 	logdir_subdir_ok = False
 	if "PORT_LOGDIR" in mysettings and \
 		os.access(mysettings["PORT_LOGDIR"], os.W_OK):
+		logdir = normalize_path(mysettings["PORT_LOGDIR"])
 		logid_path = os.path.join(mysettings["PORTAGE_BUILDDIR"], ".logid")
 		if not os.path.exists(logid_path):
 			open(_unicode_encode(logid_path), 'w')
@@ -311,22 +312,25 @@ def _prepare_workdir(mysettings):
 			encoding=_encodings['content'], errors='replace')
 
 		if "split-log" in mysettings.features:
+			log_subdir = os.path.join(logdir, "build", mysettings["CATEGORY"])
 			mysettings["PORTAGE_LOG_FILE"] = os.path.join(
-				mysettings["PORT_LOGDIR"], "build", "%s/%s:%s.log%s" % \
-				(mysettings["CATEGORY"], mysettings["PF"], logid_time,
-				compress_log_ext))
+				log_subdir, "%s:%s.log%s" %
+				(mysettings["PF"], logid_time, compress_log_ext))
 		else:
+			log_subdir = logdir
 			mysettings["PORTAGE_LOG_FILE"] = os.path.join(
-				mysettings["PORT_LOGDIR"], "%s:%s:%s.log%s" % \
+				logdir, "%s:%s:%s.log%s" % \
 				(mysettings["CATEGORY"], mysettings["PF"], logid_time,
 				compress_log_ext))
 
-		log_subdir = os.path.dirname(mysettings["PORTAGE_LOG_FILE"])
-		try:
-			ensure_dirs(log_subdir)
-		except PortageException as e:
-			writemsg(_unicode_decode("!!! %s\n") % (e,), noiselevel=-1)
+		if log_subdir is logdir:
+			logdir_subdir_ok = True
 		else:
+			try:
+				_ensure_log_subdirs(logdir, log_subdir)
+			except PortageException as e:
+				writemsg(_unicode_decode("!!! %s\n") % (e,), noiselevel=-1)
+
 			if os.access(log_subdir, os.W_OK):
 				logdir_subdir_ok = True
 			else:
@@ -340,3 +344,22 @@ def _prepare_workdir(mysettings):
 		# not through a normal pipe. See bug #162404.
 		mysettings["PORTAGE_LOG_FILE"] = os.path.join(
 			mysettings["T"], "build.log%s" % compress_log_ext)
+
+def _ensure_log_subdirs(logdir, subdir):
+	"""
+	This assumes that logdir exists, and creates subdirectories down
+	to subdir as necessary. The gid of logdir is copied to all
+	subdirectories, along with 0x2070 mode bits if present. Both logdir
+	and subdir are assumed to be normalized absolute paths.
+	"""
+	st = os.stat(logdir)
+	gid = st.st_gid
+	grp_mode = 0o2070 & st.st_mode
+
+	logdir_split_len = len(logdir.split(os.sep))
+	subdir_split = subdir.split(os.sep)[logdir_split_len:]
+	subdir_split.reverse()
+	current = logdir
+	while subdir_split:
+		current = os.path.join(current, subdir_split.pop())
+		ensure_dirs(current, gid=gid, mode=grp_mode, mask=0)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-11 15:22 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-11 15:22 UTC (permalink / raw
  To: gentoo-commits

commit:     2c60ee5faad6f39162556820a4a67d2909e1a83d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 15:22:11 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 15:22:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2c60ee5f

prepare_build_dirs: warn for logdir permission

If there is insufficient permission to use PORT_LOGDIR or the required
subdirectory, warn instead of raising an exception. Also, fall back to
using $T/build.log as a last resort.

---
 pym/portage/package/ebuild/prepare_build_dirs.py |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 259bedf..5153190 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -300,6 +300,7 @@ def _prepare_workdir(mysettings):
 	if 'compress-build-logs' in mysettings.features:
 		compress_log_ext = '.gz'
 
+	logdir_subdir_ok = False
 	if "PORT_LOGDIR" in mysettings and \
 		os.access(mysettings["PORT_LOGDIR"], os.W_OK):
 		logid_path = os.path.join(mysettings["PORTAGE_BUILDDIR"], ".logid")
@@ -320,9 +321,19 @@ def _prepare_workdir(mysettings):
 				(mysettings["CATEGORY"], mysettings["PF"], logid_time,
 				compress_log_ext))
 
-		ensure_dirs(os.path.dirname(mysettings["PORTAGE_LOG_FILE"]))
+		log_subdir = os.path.dirname(mysettings["PORTAGE_LOG_FILE"])
+		try:
+			ensure_dirs(log_subdir)
+		except PortageException as e:
+			writemsg(_unicode_decode("!!! %s\n") % (e,), noiselevel=-1)
+		else:
+			if os.access(log_subdir, os.W_OK):
+				logdir_subdir_ok = True
+			else:
+				writemsg(_unicode_decode("!!! %s: %s\n") %
+					(_("Permission Denied"), log_subdir), noiselevel=-1)
 
-	else:
+	if not logdir_subdir_ok:
 		# NOTE: When sesandbox is enabled, the local SELinux security policies
 		# may not allow output to be piped out of the sesandbox domain. The
 		# current policy will allow it to work when a pty is available, but



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-07 17:22 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-07 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     62712db56bb863b4eb0a9d9c52e7b2c3ad38df66
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 17:20:58 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 17:20:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=62712db5

ebuild(1): allow-missing-manifests for fetch

---
 pym/portage/package/ebuild/doebuild.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 267f4af..28ae459 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -765,8 +765,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				fetchme = aalist
 			else:
 				fetchme = alist
+			allow_missing_manifests = \
+				"allow-missing-manifests" in mysettings.features
 			if not fetch(fetchme, mysettings, listonly=listonly,
-				fetchonly=fetchonly):
+				fetchonly=fetchonly,
+				allow_missing_digests=allow_missing_manifests):
 				spawn_nofetch(mydbapi, myebuild, settings=mysettings)
 				if listonly:
 					# The convention for listonly mode is to report



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-07-07  7:00 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-07-07  7:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b3d25914355a95e571ca8778058b268120ae17b3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 07:00:04 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 07:00:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b3d25914

digestcheck: more allow-missing-manifests

---
 pym/portage/package/ebuild/digestcheck.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py
index e4432f1..9354bfe 100644
--- a/pym/portage/package/ebuild/digestcheck.py
+++ b/pym/portage/package/ebuild/digestcheck.py
@@ -32,6 +32,8 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None):
 	pkgdir = mysettings["O"]
 	manifest_path = os.path.join(pkgdir, "Manifest")
 	if not os.path.exists(manifest_path):
+		if allow_missing:
+			return 1
 		writemsg(_("!!! Manifest file not found: '%s'\n") % manifest_path,
 			noiselevel=-1)
 		if strict:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-30  7:35 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-30  7:35 UTC (permalink / raw
  To: gentoo-commits

commit:     86f285fe9c94e2a817de077eda7e8744130c412f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 07:34:35 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 07:34:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=86f285fe

config: filter repo-level make.defaults earlier

---
 pym/portage/package/ebuild/config.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index d553a7b..8b1a1a1 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -6,6 +6,7 @@ __all__ = [
 ]
 
 import copy
+from itertools import chain
 import logging
 import re
 import sys
@@ -520,8 +521,10 @@ class config(object):
 			for repo in self.repositories.repos_with_profiles():
 				d = getconfig(os.path.join(repo.location, "profiles", "make.defaults"),
 					expand=self.configdict["globals"].copy()) or {}
-				for blacklisted in self._env_blacklist:
-					d.pop(blacklisted, None)
+				if d:
+					for k in chain(self._env_blacklist,
+						profile_only_variables, self._global_only_vars):
+						d.pop(k, None)
 				self._repo_make_defaults[repo.name] = d
 
 			#Read package.keywords and package.accept_keywords.
@@ -1143,8 +1146,6 @@ class config(object):
 					# make a copy, since we might modify it with
 					# package.use settings
 					d = d.copy()
-					for k in self._global_only_vars:
-						d.pop(k, None)
 				cpdict = self._use_manager._repo_puse_dict.get(repo, {}).get(cp)
 				if cpdict:
 					repo_puse = ordered_by_atom_specificity(cpdict, pkg)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-30  6:57 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-30  6:57 UTC (permalink / raw
  To: gentoo-commits

commit:     2942ff81aab3accf6e2408b7cc84056700b667db
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 06:56:36 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 06:56:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2942ff81

ebuild(1): use bintree.inject for "package" phase

---
 pym/portage/package/ebuild/doebuild.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4b4eaec..267f4af 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -826,14 +826,18 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				actionmap[x]["dep"] = ' '.join(actionmap_deps[x])
 
 		if mydo in actionmap:
+			bintree = None
 			if mydo == "package":
 				# Make sure the package directory exists before executing
 				# this phase. This can raise PermissionDenied if
 				# the current user doesn't have write access to $PKGDIR.
 				if hasattr(portage, 'db'):
 					bintree = portage.db[mysettings["ROOT"]]["bintree"]
-					bintree._ensure_dir(os.path.join(
-						bintree.pkgdir, mysettings["CATEGORY"]))
+					mysettings["PORTAGE_BINPKG_TMPFILE"] = \
+						bintree.getname(mysettings.mycpv) + \
+						".%s" % (os.getpid(),)
+					bintree._ensure_dir(os.path.dirname(
+						mysettings["PORTAGE_BINPKG_TMPFILE"]))
 				else:
 					parent_dir = os.path.join(mysettings["PKGDIR"],
 						mysettings["CATEGORY"])
@@ -844,6 +848,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 			retval = spawnebuild(mydo,
 				actionmap, mysettings, debug, logfile=logfile,
 				fd_pipes=fd_pipes, returnpid=returnpid)
+
+			if retval == os.EX_OK:
+				if mydo == "package" and bintree is not None:
+					bintree.inject(mysettings.mycpv,
+						filename=mysettings["PORTAGE_BINPKG_TMPFILE"])
 		elif mydo=="qmerge":
 			# check to ensure install was run.  this *only* pops up when users
 			# forget it and are using ebuild



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-30  2:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-30  2:10 UTC (permalink / raw
  To: gentoo-commits

commit:     d0c628f34a1789e3fc9e41c2cbc69926e8ada7b9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 02:09:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 02:09:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d0c628f3

config.setcpv(): simplify repo_env code

---
 pym/portage/package/ebuild/config.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 19277d7..d553a7b 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1127,7 +1127,6 @@ class config(object):
 			has_changed = True
 
 		repo_env = []
-		repo_env_empty = True
 		if repository and repository != Package.UNKNOWN_REPO:
 			repos = []
 			try:
@@ -1146,7 +1145,6 @@ class config(object):
 					d = d.copy()
 					for k in self._global_only_vars:
 						d.pop(k, None)
-				repo_env.append(d)
 				cpdict = self._use_manager._repo_puse_dict.get(repo, {}).get(cp)
 				if cpdict:
 					repo_puse = ordered_by_atom_specificity(cpdict, pkg)
@@ -1154,9 +1152,9 @@ class config(object):
 						for x in repo_puse:
 							d["USE"] = d.get("USE", "") + " " + " ".join(x)
 				if d:
-					repo_env_empty = False
+					repo_env.append(d)
 
-		if not repo_env_empty or self.configdict["repo"]:
+		if repo_env or self.configdict["repo"]:
 			self.configdict["repo"].clear()
 			self.configdict["repo"].update(stack_dicts(repo_env,
 				incrementals=self.incrementals))



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-27  2:32 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-27  2:32 UTC (permalink / raw
  To: gentoo-commits

commit:     33997cfc32cd9457e656c7ecbfab6ff5e2c62885
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 02:32:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 02:32:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=33997cfc

Fix CONFIG_PROTECT breakage from previous commit.

---
 pym/portage/package/ebuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index c467efe..19277d7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -434,6 +434,7 @@ class config(object):
 			non_user_variables = set()
 			non_user_variables.update(profile_only_variables)
 			non_user_variables.update(self._env_blacklist)
+			non_user_variables.update(self._global_only_vars)
 			non_user_variables = frozenset(non_user_variables)
 			self._non_user_variables = non_user_variables
 
@@ -1209,7 +1210,6 @@ class config(object):
 
 		protected_pkg_keys = set(pkg_configdict)
 		protected_pkg_keys.discard('USE')
-		protected_pkg_keys.update(self._global_only_vars)
 
 		# If there are _any_ package.env settings for this package
 		# then it automatically triggers config.reset(), in order



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-25  5:42 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-25  5:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e543f089e917e2d4029d3338238df4013d46c66a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 25 05:42:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 25 05:42:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e543f089

prepare_features_dirs: fix ccache/distcc libdir

This will fix bug #355283.

---
 pym/portage/package/ebuild/prepare_build_dirs.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 992d2ba..259bedf 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -142,14 +142,22 @@ def _adjust_perms_msg(settings, msg):
 
 def _prepare_features_dirs(mysettings):
 
+	# Use default ABI libdir in accordance with bug #355283.
+	libdir = None
+	default_abi = mysettings.get("DEFAULT_ABI")
+	if default_abi:
+		libdir = mysettings.get("LIBDIR_" + default_abi)
+	if not libdir:
+		libdir = "lib"
+
 	features_dirs = {
 		"ccache":{
-			"path_dir": "/usr/lib/ccache/bin",
+			"path_dir": "/usr/%s/ccache/bin" % (libdir,),
 			"basedir_var":"CCACHE_DIR",
 			"default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "ccache"),
 			"always_recurse":False},
 		"distcc":{
-			"path_dir": "/usr/lib/distcc/bin",
+			"path_dir": "/usr/%s/distcc/bin" % (libdir,),
 			"basedir_var":"DISTCC_DIR",
 			"default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
 			"subdirs":("lock", "state"),



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-21  0:44 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-21  0:44 UTC (permalink / raw
  To: gentoo-commits

commit:     aa838c657803ac29628a1aa706bda3fc89c94dab
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 21 00:43:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 00:43:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=aa838c65

config: fix repositories attribute for clone

---
 pym/portage/package/ebuild/config.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 466b701..b75a177 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -203,6 +203,7 @@ class config(object):
 			self.profile_path = clone.profile_path
 			self.profiles = clone.profiles
 			self.packages = clone.packages
+			self.repositories = clone.repositories
 			self._iuse_implicit_match = clone._iuse_implicit_match
 			self._non_user_variables = clone._non_user_variables
 			self.usemask = clone.usemask



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-17 19:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-17 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     8788bb4765821026ca0524985b7b20fd50e618ad
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 19:39:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 19:39:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8788bb47

doebuild: don't set REPLACING_VERSIONS for remove

Also, don't call backup_changes with this variable, since it's not
necessary and we don't want to pollute the config instance.

---
 pym/portage/package/ebuild/doebuild.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 782e8f1..9df7dc7 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -701,8 +701,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				mysettings.configdict["pkg"]["EMERGE_FROM"] = "binary"
 				mysettings.configdict["pkg"]["MERGE_TYPE"] = "binary"
 
+		# NOTE: It's not possible to set REPLACED_BY_VERSION for prerm
+		#       and postrm here, since we don't necessarily know what
+		#       versions are being installed. This could be a problem
+		#       for API consumers if they don't use dblink.treewalk()
+		#       to execute prerm and postrm.
 		if eapi_exports_replace_vars(mysettings["EAPI"]) and \
-			(mydo in ("postinst", "postrm", "preinst", "prerm", "pretend", "setup") or \
+			(mydo in ("postinst", "preinst", "pretend", "setup") or \
 			("noauto" not in features and not returnpid and \
 			(mydo in actionmap_deps or mydo in ("merge", "package", "qmerge")))):
 			if not vartree:
@@ -718,7 +723,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 					set(portage.versions.cpv_getversion(match) \
 						for match in vardb.match(cpv_slot) + \
 						vardb.match('='+cpv)))
-				mysettings.backup_changes("REPLACING_VERSIONS")
 
 		# if any of these are being called, handle them -- running them out of
 		# the sandbox -- and stop now.



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-17 19:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-17 19:27 UTC (permalink / raw
  To: gentoo-commits

commit:     6e46d31e069d478d51ab2c0febc90f3f69874850
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 19:25:31 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 19:25:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6e46d31e

doebuild: export REPLACING_VERSIONS more

This is for api consumers like Sabayon's Entropy.

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 5c81fbd..782e8f1 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -702,7 +702,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 				mysettings.configdict["pkg"]["MERGE_TYPE"] = "binary"
 
 		if eapi_exports_replace_vars(mysettings["EAPI"]) and \
-			(mydo in ("pretend", "setup") or \
+			(mydo in ("postinst", "postrm", "preinst", "prerm", "pretend", "setup") or \
 			("noauto" not in features and not returnpid and \
 			(mydo in actionmap_deps or mydo in ("merge", "package", "qmerge")))):
 			if not vartree:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-16 19:27 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-16 19:27 UTC (permalink / raw
  To: gentoo-commits

commit:     9a3b6af0aeaf475b21f4fe318a5c8a2ac2e27ff3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 16 19:23:26 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 16 19:23:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9a3b6af0

prepare_build_dirs: skip FEATURES dirs more

We don't need to prepare ccache/distcc FEATURES dirs for pkg_info or
pkg_pretend phases. This will fix bug #371909.

---
 pym/portage/package/ebuild/prepare_build_dirs.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 74cf556..992d2ba 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -105,7 +105,7 @@ def prepare_build_dirs(myroot=None, settings=None, cleanup=False):
 			pass
 
 	_prepare_workdir(mysettings)
-	if mysettings.get('EBUILD_PHASE') != 'fetch':
+	if mysettings.get("EBUILD_PHASE") not in ("info", "fetch", "pretend"):
 		# Avoid spurious permissions adjustments when fetching with
 		# a temporary PORTAGE_TMPDIR setting (for fetchonly).
 		_prepare_features_dirs(mysettings)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-13 15:26 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-13 15:26 UTC (permalink / raw
  To: gentoo-commits

commit:     adc077443a2dbbecad8b4635b7cf1fcff7a9bd03
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 15:25:58 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 15:25:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=adc07744

digestgen: spawn_nofetch (fix previous commit)

This call was erroneously removed in the previous commit. We have to
call spawn_nofetch since the fetch() function no longer calls it
automatically.

---
 pym/portage/package/ebuild/digestgen.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 2b9361d..eb7210e 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -139,6 +139,8 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					if not fetch({myfile : uris}, mysettings):
 						myebuild = os.path.join(mysettings["O"],
 							catsplit(cpv)[1] + ".ebuild")
+						spawn_nofetch(myportdb, myebuild,
+							settings=mysettings)
 						writemsg(_("!!! Fetch failed for %s, can't update "
 							"Manifest\n") % myfile, noiselevel=-1)
 						if myfile in dist_hashes and \



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-13 13:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-13 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f5a31e2578699f0a0bb91269388702c90cbeab38
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 13:40:39 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 13:40:39 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f5a31e25

digestgen: always allow fetch from mirror://

This fixes repoman and ebuild(1) to fetch from mirror:// URIs even
though RESTRICT=fetch is set (this behavior already works for emerge
since it does not call fetch() via digestgen).

---
 pym/portage/package/ebuild/digestgen.py |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py
index 9408b14..2b9361d 100644
--- a/pym/portage/package/ebuild/digestgen.py
+++ b/pym/portage/package/ebuild/digestgen.py
@@ -1,4 +1,4 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ['digestgen']
@@ -106,6 +106,7 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					os.path.dirname(mysettings["O"])))
 				for myfile in missing_files:
 					uris = set()
+					all_restrict = set()
 					for cpv in distfiles_map[myfile]:
 						uris.update(myportdb.getFetchMap(
 							cpv, mytree=mytree)[myfile])
@@ -115,9 +116,19 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 						# they don't apply unconditionally. Assume such
 						# conditionals only apply on the client side where
 						# digestgen() does not need to be called.
-						restrict = use_reduce(restrict,
-							flat=True, matchnone=True)
-						restrict_fetch = 'fetch' in restrict
+						all_restrict.update(use_reduce(restrict,
+							flat=True, matchnone=True))
+
+						# fetch() uses CATEGORY and PF to display a message
+						# when fetch restriction is triggered.
+						cat, pf = catsplit(cpv)
+						mysettings["CATEGORY"] = cat
+						mysettings["PF"] = pf
+
+					# fetch() uses PORTAGE_RESTRICT to control fetch
+					# restriction, which is only applied to files that
+					# are not fetchable via a mirror:// URI.
+					mysettings["PORTAGE_RESTRICT"] = " ".join(all_restrict)
 
 					try:
 						st = os.stat(os.path.join(
@@ -125,12 +136,9 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
 					except OSError:
 						st = None
 
-					if restrict_fetch or \
-						not fetch({myfile : uris}, mysettings):
+					if not fetch({myfile : uris}, mysettings):
 						myebuild = os.path.join(mysettings["O"],
 							catsplit(cpv)[1] + ".ebuild")
-						spawn_nofetch(myportdb, myebuild,
-							settings=mysettings)
 						writemsg(_("!!! Fetch failed for %s, can't update "
 							"Manifest\n") % myfile, noiselevel=-1)
 						if myfile in dist_hashes and \



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-11  0:02 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 191+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2011-06-11  0:02 UTC (permalink / raw
  To: gentoo-commits

commit:     73d085771d8e82a7a1e6d4ff1ef85e632ef54be6
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Sat Jun 11 00:02:27 2011 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 00:02:27 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=73d08577

Fix a typo.

---
 pym/portage/package/ebuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index d28327e..b45f3c1 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -868,7 +868,7 @@ class config(object):
 	def reset(self, keeping_pkg=0, use_cache=None):
 		"""
 		Restore environment from self.backupenv, call self.regenerate()
-		@param keeping_pkg: Should we keep the set_cpv() data or delete it.
+		@param keeping_pkg: Should we keep the setcpv() data or delete it.
 		@type keeping_pkg: Boolean
 		@rype: None
 		"""



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-09 13:58 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-09 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     786bb1096c704f03b6c677726ef0b9142a8d38a7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 13:58:37 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 13:58:37 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=786bb109

getmaskingstatus: fix keywords logic

This will fix bug #370477.

---
 pym/portage/package/ebuild/getmaskingstatus.py |   38 ++++++-----------------
 1 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingstatus.py b/pym/portage/package/ebuild/getmaskingstatus.py
index 5901e57..4c65fcc 100644
--- a/pym/portage/package/ebuild/getmaskingstatus.py
+++ b/pym/portage/package/ebuild/getmaskingstatus.py
@@ -93,40 +93,22 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
 		return [_MaskReason("EAPI", "EAPI %s" % eapi)]
 	egroups = settings.configdict["backupenv"].get(
 		"ACCEPT_KEYWORDS", "").split()
-	pgroups = settings["ACCEPT_KEYWORDS"].split()
+	global_accept_keywords = settings.get("ACCEPT_KEYWORDS", "")
+	pgroups = global_accept_keywords.split()
 	myarch = settings["ARCH"]
 	if pgroups and myarch not in pgroups:
 		"""For operating systems other than Linux, ARCH is not necessarily a
 		valid keyword."""
 		myarch = pgroups[0].lstrip("~")
 
-	cp = cpv_getkey(mycpv)
-	pkgdict = settings._keywords_manager.pkeywordsdict.get(cp)
-	matches = False
-	if pkgdict:
-		pkg = "".join((mycpv, _slot_separator, metadata["SLOT"]))
-		if myrepo is None:
-			myrepo = metadata.get("repository")
-		if myrepo is not None and myrepo != Package.UNKNOWN_REPO:
-			pkg = "".join((pkg, _repo_separator, myrepo))
-		cpv_slot_list = [pkg]
-		for atom, pkgkeywords in pkgdict.items():
-			if match_from_list(atom, cpv_slot_list):
-				matches = True
-				pgroups.extend(pkgkeywords)
-	if matches or egroups:
-		pgroups.extend(egroups)
-		inc_pgroups = set()
-		for x in pgroups:
-			if x.startswith("-"):
-				if x == "-*":
-					inc_pgroups.clear()
-				else:
-					inc_pgroups.discard(x[1:])
-			else:
-				inc_pgroups.add(x)
-		pgroups = inc_pgroups
-		del inc_pgroups
+	# NOTE: This logic is copied from KeywordsManager.getMissingKeywords().
+	unmaskgroups = settings._keywords_manager.getPKeywords(mycpv,
+		metadata["SLOT"], metadata["repository"], global_accept_keywords)
+	pgroups.extend(unmaskgroups)
+	if unmaskgroups or egroups:
+		pgroups = settings._keywords_manager._getEgroups(egroups, pgroups)
+	else:
+		pgroups = set(pgroups)
 
 	kmask = "missing"
 	kmask_hint = None



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-09 13:14 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-09 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     1f2d8bc9960221a9a04df57d21a54c868bb95b05
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 13:13:32 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 13:13:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1f2d8bc9

getmaskingreason: EAPI metadata safety

Return early since otherwise we might produce invalid results given
that the EAPI is not supported.

---
 pym/portage/package/ebuild/getmaskingreason.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index f027876..f2af638 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -47,6 +47,17 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 		if myrepo is not None:
 			myrepo = _gen_valid_repo(metadata["repository"])
 
+	if metadata is not None and \
+		not portage.eapi_is_supported(metadata["EAPI"]):
+		# Return early since otherwise we might produce invalid
+		# results given that the EAPI is not supported. Also,
+		# metadata is mostly useless in this case since it doesn't
+		# contain essential things like SLOT.
+		if return_location:
+			return (None, None)
+		else:
+			return None
+
 	# Sometimes we can't access SLOT or repository due to corruption.
 	pkg = mycpv
 	if metadata is not None:



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-06 10:30 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-06 10:30 UTC (permalink / raw
  To: gentoo-commits

commit:     de0657223812d7768e6b474d6db84d87fa2242ff
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  6 10:29:48 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 10:29:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=de065722

getmaskingreason: assume myrepo arg is valid

---
 pym/portage/package/ebuild/getmaskingreason.py |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 4e3833d..c19066f 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -16,6 +16,12 @@ from _emerge.Package import Package
 
 def getmaskingreason(mycpv, metadata=None, settings=None,
 	portdb=None, return_location=False, myrepo=None):
+	"""
+	If specified, the myrepo argument is assumed it be valid. This
+	should be a safe assumption since portdbapi methods always
+	return valid repo names and valid "repository" metadata from
+	aux_get.
+	"""
 	if settings is None:
 		settings = portage.settings
 	if portdb is None:
@@ -24,9 +30,6 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 	if not mysplit:
 		raise ValueError(_("invalid CPV: %s") % mycpv)
 
-	if myrepo:
-		myrepo = _gen_valid_repo(myrepo)
-
 	if metadata is None:
 		db_keys = list(portdb._aux_cache_keys)
 		try:
@@ -36,10 +39,10 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 			if not portdb.cpv_exists(mycpv):
 				raise
 		else:
-			if not myrepo:
+			if myrepo is None:
 				myrepo = _gen_valid_repo(metadata["repository"])
 
-	elif not myrepo:
+	elif myrepo is None:
 		myrepo = metadata.get("repository")
 		if myrepo is not None:
 			myrepo = _gen_valid_repo(metadata["repository"])



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-06 10:10 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-06 10:10 UTC (permalink / raw
  To: gentoo-commits

commit:     854dc8bdbe487469c57a40e73629f06bdbae5adf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  6 10:09:51 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 10:09:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=854dc8bd

config: add missing Package import

---
 pym/portage/package/ebuild/config.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index a3a7f82..d28327e 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -11,6 +11,7 @@ import re
 import sys
 import warnings
 
+from _emerge.Package import Package
 import portage
 portage.proxy.lazyimport.lazyimport(globals(),
 	'portage.data:portage_gid',



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-06-06  9:11 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-06-06  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     29dc8a7795161bd37e9cfbb5e2b19ee2c34f7a02
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  6 09:11:31 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 09:11:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=29dc8a77

getmaskingreason: add myrepo argument

---
 pym/portage/package/ebuild/getmaskingreason.py |   39 +++++++++++++++++------
 1 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 6a0cf42..4e3833d 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -1,4 +1,4 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ['getmaskingreason']
@@ -9,10 +9,13 @@ from portage.const import USER_CONFIG_PATH
 from portage.dep import Atom, match_from_list, _slot_separator, _repo_separator
 from portage.exception import InvalidAtom
 from portage.localization import _
+from portage.repository.config import _gen_valid_repo
 from portage.util import grablines, normalize_path
 from portage.versions import catpkgsplit
+from _emerge.Package import Package
 
-def getmaskingreason(mycpv, metadata=None, settings=None, portdb=None, return_location=False):
+def getmaskingreason(mycpv, metadata=None, settings=None,
+	portdb=None, return_location=False, myrepo=None):
 	if settings is None:
 		settings = portage.settings
 	if portdb is None:
@@ -20,21 +23,37 @@ def getmaskingreason(mycpv, metadata=None, settings=None, portdb=None, return_lo
 	mysplit = catpkgsplit(mycpv)
 	if not mysplit:
 		raise ValueError(_("invalid CPV: %s") % mycpv)
+
+	if myrepo:
+		myrepo = _gen_valid_repo(myrepo)
+
 	if metadata is None:
 		db_keys = list(portdb._aux_cache_keys)
 		try:
-			metadata = dict(zip(db_keys, portdb.aux_get(mycpv, db_keys)))
+			metadata = dict(zip(db_keys,
+				portdb.aux_get(mycpv, db_keys, myrepo=myrepo)))
 		except KeyError:
 			if not portdb.cpv_exists(mycpv):
 				raise
-	if metadata is None:
-		# Can't access SLOT due to corruption.
-		cpv_slot_list = [mycpv]
-	else:
+		else:
+			if not myrepo:
+				myrepo = _gen_valid_repo(metadata["repository"])
+
+	elif not myrepo:
+		myrepo = metadata.get("repository")
+		if myrepo is not None:
+			myrepo = _gen_valid_repo(metadata["repository"])
+
+	# Sometimes we can't access SLOT or repository due to corruption.
+	pkg = mycpv
+	if metadata is not None:
 		pkg = "".join((mycpv, _slot_separator, metadata["SLOT"]))
-		if 'repository' in metadata:
-			pkg = "".join((pkg, _repo_separator, metadata['repository']))
-		cpv_slot_list = [pkg]
+	# At this point myrepo should be None, a valid name, or
+	# Package.UNKNOWN_REPO which we ignore.
+	if myrepo is not None and myrepo != Package.UNKNOWN_REPO:
+		pkg = "".join((pkg, _repo_separator, myrepo))
+	cpv_slot_list = [pkg]
+
 	mycp=mysplit[0]+"/"+mysplit[1]
 
 	# XXX- This is a temporary duplicate of code from the config constructor.



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-05-24  3:02 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-05-24  3:02 UTC (permalink / raw
  To: gentoo-commits

commit:     2610641d07aa6af21c132d438995838c516a67f2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue May 24 03:02:30 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue May 24 03:02:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2610641d

doebuild_environment: move EAPI code later

All EAPI dependent code comes last, so that essential
variables like PORTAGE_BUILDDIR are still initialized even in
cases when UnsupportedAPIException needs to be raised, which
can be useful when uninstalling a package that has corrupt
EAPI metadata.

---
 pym/portage/package/ebuild/doebuild.py |  121 +++++++++++++++++--------------
 1 files changed, 66 insertions(+), 55 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index f83a1e3..4cdd765 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -119,6 +119,14 @@ def _spawn_phase(phase, settings, actionmap=None, **kwargs):
 def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	debug=False, use_cache=None, db=None):
 	"""
+	Create and store environment variable in the config instance
+	that's passed in as the "settings" parameter. This will raise
+	UnsupportedAPIException if the given ebuild has an unsupported
+	EAPI. All EAPI dependent code comes last, so that essential
+	variables like PORTAGE_BUILDDIR are still initialized even in
+	cases when UnsupportedAPIException needs to be raised, which
+	can be useful when uninstalling a package that has corrupt
+	EAPI metadata.
 	The myroot and use_cache parameters are unused.
 	"""
 	myroot = None
@@ -141,7 +149,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	else:
 		cat = os.path.basename(normalize_path(os.path.join(pkg_dir, "..")))
 
-	eapi = None
 	mypv = os.path.basename(ebuild_path)[:-7]
 
 	mycpv = cat+"/"+mypv
@@ -222,50 +229,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	if noiselimit < 0:
 		mysettings["PORTAGE_QUIET"] = "1"
 
-	if mydo == 'depend' and 'EAPI' not in mysettings.configdict['pkg']:
-		if eapi is None and 'parse-eapi-ebuild-head' in mysettings.features:
-			eapi = _parse_eapi_ebuild_head(
-				codecs.open(_unicode_encode(ebuild_path,
-				encoding=_encodings['fs'], errors='strict'),
-				mode='r', encoding=_encodings['content'], errors='replace'))
-
-		if eapi is not None:
-			if not eapi_is_supported(eapi):
-				raise UnsupportedAPIException(mycpv, eapi)
-			mysettings.configdict['pkg']['EAPI'] = eapi
-
-	if mydo != "depend":
-		# Metadata vars such as EAPI and RESTRICT are
-		# set by the above config.setcpv() call.
-		eapi = mysettings["EAPI"]
-		if not eapi_is_supported(eapi):
-			# can't do anything with this.
-			raise UnsupportedAPIException(mycpv, eapi)
-
-		if hasattr(mydbapi, "getFetchMap") and \
-			("A" not in mysettings.configdict["pkg"] or \
-			"AA" not in mysettings.configdict["pkg"]):
-			src_uri, = mydbapi.aux_get(mysettings.mycpv,
-				["SRC_URI"], mytree=mytree)
-			metadata = {
-				"EAPI"    : eapi,
-				"SRC_URI" : src_uri,
-			}
-			use = frozenset(mysettings["PORTAGE_USE"].split())
-			try:
-				uri_map = _parse_uri_map(mysettings.mycpv, metadata, use=use)
-			except InvalidDependString:
-				mysettings.configdict["pkg"]["A"] = ""
-			else:
-				mysettings.configdict["pkg"]["A"] = " ".join(uri_map)
-
-			try:
-				uri_map = _parse_uri_map(mysettings.mycpv, metadata)
-			except InvalidDependString:
-				mysettings.configdict["pkg"]["AA"] = ""
-			else:
-				mysettings.configdict["pkg"]["AA"] = " ".join(uri_map)
-
 	if mysplit[2] == "r0":
 		mysettings["PVR"]=mysplit[1]
 	else:
@@ -311,7 +274,62 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 	mysettings["PM_EBUILD_HOOK_DIR"] = os.path.join(
 		mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_DIR)
 
-	#set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent.
+	# Allow color.map to control colors associated with einfo, ewarn, etc...
+	mycolors = []
+	for c in ("GOOD", "WARN", "BAD", "HILITE", "BRACKET"):
+		mycolors.append("%s=$'%s'" % \
+			(c, style_to_ansi_code(c)))
+	mysettings["PORTAGE_COLORMAP"] = "\n".join(mycolors)
+
+	# All EAPI dependent code comes last, so that essential variables
+	# like PORTAGE_BUILDDIR are still initialized even in cases when
+	# UnsupportedAPIException needs to be raised, which can be useful
+	# when uninstalling a package that has corrupt EAPI metadata.
+	eapi = None
+	if mydo == 'depend' and 'EAPI' not in mysettings.configdict['pkg']:
+		if eapi is None and 'parse-eapi-ebuild-head' in mysettings.features:
+			eapi = _parse_eapi_ebuild_head(
+				codecs.open(_unicode_encode(ebuild_path,
+				encoding=_encodings['fs'], errors='strict'),
+				mode='r', encoding=_encodings['content'], errors='replace'))
+
+		if eapi is not None:
+			if not eapi_is_supported(eapi):
+				raise UnsupportedAPIException(mycpv, eapi)
+			mysettings.configdict['pkg']['EAPI'] = eapi
+
+	if mydo != "depend":
+		# Metadata vars such as EAPI and RESTRICT are
+		# set by the above config.setcpv() call.
+		eapi = mysettings["EAPI"]
+		if not eapi_is_supported(eapi):
+			# can't do anything with this.
+			raise UnsupportedAPIException(mycpv, eapi)
+
+		if hasattr(mydbapi, "getFetchMap") and \
+			("A" not in mysettings.configdict["pkg"] or \
+			"AA" not in mysettings.configdict["pkg"]):
+			src_uri, = mydbapi.aux_get(mysettings.mycpv,
+				["SRC_URI"], mytree=mytree)
+			metadata = {
+				"EAPI"    : eapi,
+				"SRC_URI" : src_uri,
+			}
+			use = frozenset(mysettings["PORTAGE_USE"].split())
+			try:
+				uri_map = _parse_uri_map(mysettings.mycpv, metadata, use=use)
+			except InvalidDependString:
+				mysettings.configdict["pkg"]["A"] = ""
+			else:
+				mysettings.configdict["pkg"]["A"] = " ".join(uri_map)
+
+			try:
+				uri_map = _parse_uri_map(mysettings.mycpv, metadata)
+			except InvalidDependString:
+				mysettings.configdict["pkg"]["AA"] = ""
+			else:
+				mysettings.configdict["pkg"]["AA"] = " ".join(uri_map)
+
 	if not eapi_exports_KV(eapi):
 		# Discard KV for EAPIs that don't support it. Cache KV is restored
 		# from the backupenv whenever config.reset() is called.
@@ -324,18 +342,11 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 			os.path.join(mysettings['EROOT'], "usr/src/linux"))
 		if mykv:
 			# Regular source tree
-			mysettings["KV"]=mykv
+			mysettings["KV"] = mykv
 		else:
-			mysettings["KV"]=""
+			mysettings["KV"] = ""
 		mysettings.backup_changes("KV")
 
-	# Allow color.map to control colors associated with einfo, ewarn, etc...
-	mycolors = []
-	for c in ("GOOD", "WARN", "BAD", "HILITE", "BRACKET"):
-		mycolors.append("%s=$'%s'" % \
-			(c, style_to_ansi_code(c)))
-	mysettings["PORTAGE_COLORMAP"] = "\n".join(mycolors)
-
 _doebuild_manifest_cache = None
 _doebuild_broken_ebuilds = set()
 _doebuild_broken_manifests = set()



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-05-09 22:34 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-05-09 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     192730dc67e0181033c5743ffee77291b04a7a28
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May  9 20:41:56 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May  9 20:41:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=192730dc

config: call _populate_treeVirtuals directly

---
 pym/portage/package/ebuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index e510795..d1842f1 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1965,7 +1965,7 @@ class config(object):
 		"""Reduce the provides into a list by CP."""
 		if self._virtuals_manager._treeVirtuals is None:
 			if self.local_config:
-				self._virtuals_manager.populate_treeVirtuals_if_needed(vartree)
+				self._virtuals_manager._populate_treeVirtuals(vartree)
 			else:
 				self._virtuals_manager._treeVirtuals = {}
 



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-04-28 21:32 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-04-28 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     a7971b43b4b04eaadbf10ad635677d4a737d7773
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 28 21:31:03 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr 28 21:31:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7971b43

_postinst_bsdflags: apply to $ROOT, not $D

---
 pym/portage/package/ebuild/doebuild.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 2a40791..1c04822 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1406,7 +1406,7 @@ def _postinst_bsdflags(mysettings):
 	if bsd_chflags:
 		# Restore all of the flags saved above.
 		os.system("mtree -e -p %s -U -k flags < %s > /dev/null" % \
-			(_shell_quote(mysettings["D"]),
+			(_shell_quote(mysettings["ROOT"]),
 			_shell_quote(os.path.join(mysettings["T"], "bsdflags.mtree"))))
 
 def _post_src_install_uid_fix(mysettings, out):



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-03-04 16:41 Zac Medico
  0 siblings, 0 replies; 191+ messages in thread
From: Zac Medico @ 2011-03-04 16:41 UTC (permalink / raw
  To: gentoo-commits

commit:     233c2efb6d86d9ac603ba224b71c0b65a64118f7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  4 16:39:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar  4 16:39:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=233c2efb

config: quote overlays containing spaces

This will fix bug #357297.

---
 pym/portage/package/ebuild/config.py |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1f943e4..82d660d 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -482,27 +482,28 @@ class config(object):
 				main_repo = main_repo.user_location
 				self["PORTDIR"] = main_repo
 				self.backup_changes("PORTDIR")
+
+			# repoman controls PORTDIR_OVERLAY via the environment, so no
+			# special cases are needed here.
 			portdir_overlay = list(self.repositories.repoUserLocationList())
 			if self["PORTDIR"] in portdir_overlay:
 				portdir_overlay.remove(self["PORTDIR"])
-			self["PORTDIR_OVERLAY"] = " ".join(portdir_overlay)
-			self.backup_changes("PORTDIR_OVERLAY")
-
-			""" repoman controls PORTDIR_OVERLAY via the environment, so no
-			special cases are needed here."""
 
-			overlays = shlex_split(self.get('PORTDIR_OVERLAY', ''))
-			if overlays:
-				new_ov = []
-				for ov in overlays:
+			new_ov = []
+			if portdir_overlay:
+				whitespace_re = re.compile(r"\s")
+				for ov in portdir_overlay:
 					ov = normalize_path(ov)
 					if os.path.isdir(ov):
+						if whitespace_re.search(ov) is not None:
+							ov = portage._shell_quote(ov)
 						new_ov.append(ov)
 					else:
 						writemsg(_("!!! Invalid PORTDIR_OVERLAY"
 							" (not a dir): '%s'\n") % ov, noiselevel=-1)
-				self["PORTDIR_OVERLAY"] = " ".join(new_ov)
-				self.backup_changes("PORTDIR_OVERLAY")
+
+			self["PORTDIR_OVERLAY"] = " ".join(new_ov)
+			self.backup_changes("PORTDIR_OVERLAY")
 
 			locations_manager.set_port_dirs(self["PORTDIR"], self["PORTDIR_OVERLAY"])
 
@@ -2130,7 +2131,7 @@ class config(object):
 	def thirdpartymirrors(self):
 		if getattr(self, "_thirdpartymirrors", None) is None:
 			profileroots = [os.path.join(self["PORTDIR"], "profiles")]
-			for x in self["PORTDIR_OVERLAY"].split():
+			for x in shlex_split(self.get("PORTDIR_OVERLAY", "")):
 				profileroots.insert(0, os.path.join(x, "profiles"))
 			thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots]
 			self._thirdpartymirrors = stack_dictlist(thirdparty_lists, incremental=True)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-02-04 17:23 zmedico
  0 siblings, 0 replies; 191+ messages in thread
From: zmedico @ 2011-02-04 17:23 UTC (permalink / raw
  To: gentoo-commits

commit:     cc26e6eeb8d3046f8e928c4e37b1d390c80c0c35
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  4 17:23:12 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb  4 17:23:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cc26e6eeb8d3046f8e928c4e37b1d390c80c0c35

ebuild(1): skip REQUIRED_USE for some phases

---
 pym/portage/package/ebuild/doebuild.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 2eb9f11..5272f23 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1057,7 +1057,9 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
 		if mydo not in invalid_dep_exempt_phases:
 			return 1
 
-	if not pkg.built and pkg.metadata["REQUIRED_USE"] and \
+	if not pkg.built and \
+		mydo not in ("digest", "help", "manifest") and \
+		pkg.metadata["REQUIRED_USE"] and \
 		eapi_has_required_use(pkg.metadata["EAPI"]):
 		result = check_required_use(pkg.metadata["REQUIRED_USE"],
 			pkg.use.enabled, pkg.iuse.is_valid_flag)



^ permalink raw reply related	[flat|nested] 191+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
@ 2011-02-04 17:18 zmedico
  0 siblings, 0 replies; 191+ messages in thread
From: zmedico @ 2011-02-04 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     7af8dcf3997cfaf1def14dbfb090242a0751f6a9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  4 17:17:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb  4 17:17:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7af8dcf3997cfaf1def14dbfb090242a0751f6a9

ebuild(1): ensure REQUIRED_USE is satisfied

---
 pym/portage/package/ebuild/doebuild.py |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index bbc3a4a..2eb9f11 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -39,9 +39,10 @@ from portage.data import portage_gid, portage_uid, secpass, \
 	uid, userpriv_groups
 from portage.dbapi.porttree import _parse_uri_map
 from portage.dbapi.virtual import fakedbapi
-from portage.dep import Atom, paren_enclose, use_reduce
+from portage.dep import Atom, check_required_use, \
+	human_readable_required_use, paren_enclose, use_reduce
 from portage.eapi import eapi_exports_KV, eapi_exports_merge_type, \
-	eapi_exports_replace_vars, \
+	eapi_exports_replace_vars, eapi_has_required_use, \
 	eapi_has_src_prepare_and_src_configure, eapi_has_pkg_pretend
 from portage.elog import elog_process
 from portage.elog.messages import eerror, eqawarn
@@ -1056,6 +1057,28 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi):
 		if mydo not in invalid_dep_exempt_phases:
 			return 1
 
+	if not pkg.built and pkg.metadata["REQUIRED_USE"] and \
+		eapi_has_required_use(pkg.metadata["EAPI"]):
+		result = check_required_use(pkg.metadata["REQUIRED_USE"],
+			pkg.use.enabled, pkg.iuse.is_valid_flag)
+		if not result:
+			reduced_noise = result.tounicode()
+			writemsg("\n  %s\n" % _("The following REQUIRED_USE flag" + \
+				" constraints are unsatisfied:"), noiselevel=-1)
+			writemsg("    %s\n" % reduced_noise,
+				noiselevel=-1)
+			normalized_required_use = \
+				" ".join(pkg.metadata["REQUIRED_USE"].split())
+			if reduced_noise != normalized_required_use:
+				writemsg("\n  %s\n" % _("The above constraints " + \
+					"are a subset of the following complete expression:"),
+					noiselevel=-1)
+				writemsg("    %s\n" % \
+					human_readable_required_use(normalized_required_use),
+					noiselevel=-1)
+			writemsg("\n", noiselevel=-1)
+			return 1
+
 	return os.EX_OK
 
 # XXX This would be to replace getstatusoutput completely.



^ permalink raw reply related	[flat|nested] 191+ messages in thread

end of thread, other threads:[~2018-07-15 21:54 UTC | newest]

Thread overview: 191+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 23:14 [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2018-07-15 21:54 Zac Medico
2018-06-23  9:24 Ulrich Müller
2018-05-26  6:09 Zac Medico
2018-05-24 19:45 Zac Medico
2018-05-03 18:48 Zac Medico
2018-03-03 22:24 Zac Medico
2018-02-05 19:25 Michał Górny
2018-01-27 10:19 Michał Górny
2018-01-27 10:19 Michał Górny
2018-01-26 14:59 Michał Górny
2017-11-10  0:32 Zac Medico
2017-07-30  0:07 Zac Medico
2017-03-14 16:30 Michał Górny
2017-03-10  1:46 Zac Medico
2016-11-30  1:10 Zac Medico
2016-09-24  7:23 Zac Medico
2016-09-14 21:39 Zac Medico
2016-09-14 21:28 Zac Medico
2016-06-06 15:50 Zac Medico
2016-02-23 20:32 Zac Medico
2015-12-20 17:39 Michał Górny
2015-12-13 21:27 Zac Medico
2015-12-13 16:54 Zac Medico
2015-12-09 12:37 Arfrever Frehtes Taifersar Arahesis
2015-12-09  1:30 Zac Medico
2015-12-01 17:56 Arfrever Frehtes Taifersar Arahesis
2015-10-08  0:47 Brian Dolbec
2015-04-21 23:52 Zac Medico
2015-03-04 19:29 Zac Medico
2015-03-03 21:26 git@oystercatcher mirror+tproxy
2015-03-03 21:26 Zac Medico
2015-01-31 21:28 Michał Górny
2015-01-30 20:48 Brian Dolbec
2015-01-30 20:48 Brian Dolbec
2014-12-10 20:24 Arfrever Frehtes Taifersar Arahesis
2014-11-05 19:41 Zac Medico
2014-10-22 23:26 Zac Medico
2014-02-17 20:35 Sebastian Luther
2013-09-06 20:10 Zac Medico
2013-08-22  3:57 Zac Medico
2013-08-06 20:02 Zac Medico
2013-07-26 21:01 Zac Medico
2013-07-23 20:27 Zac Medico
2013-07-23 20:09 Arfrever Frehtes Taifersar Arahesis
2013-07-14 18:13 Zac Medico
2013-07-07 19:34 Zac Medico
2013-07-06 22:06 Zac Medico
2013-07-06  1:41 Zac Medico
2013-06-24 20:01 Arfrever Frehtes Taifersar Arahesis
2013-05-18 11:34 Zac Medico
2013-05-03  2:21 Zac Medico
2013-05-03  1:52 Zac Medico
2013-03-27 15:21 Zac Medico
2013-03-27  4:15 Zac Medico
2013-02-27  0:27 Zac Medico
2013-02-18  2:09 Mike Frysinger
2013-02-11 15:29 Zac Medico
2013-02-11  3:06 Zac Medico
2013-02-02  9:03 Zac Medico
2013-01-25 19:49 Zac Medico
2013-01-15 15:16 Zac Medico
2013-01-11  6:56 Zac Medico
2013-01-07  8:41 Zac Medico
2013-01-07  7:12 Zac Medico
2013-01-03 23:55 Zac Medico
2012-12-19 21:48 Zac Medico
2012-12-05 21:19 Zac Medico
2012-12-05 18:02 Zac Medico
2012-10-18  4:58 Zac Medico
2012-10-18  3:43 Zac Medico
2012-10-18  1:56 Zac Medico
2012-10-18  0:50 Zac Medico
2012-10-08 22:07 Zac Medico
2012-09-21 22:17 Zac Medico
2012-09-21 18:01 Zac Medico
2012-09-20  3:38 Zac Medico
2012-09-20  3:14 Zac Medico
2012-09-20  2:36 Zac Medico
2012-09-14  2:24 Zac Medico
2012-08-30 16:43 Zac Medico
2012-08-23 17:10 Zac Medico
2012-07-31 22:02 Zac Medico
2012-07-31 10:21 Zac Medico
2012-06-12  2:00 Zac Medico
2012-06-02  0:13 Zac Medico
2012-06-01 22:51 Zac Medico
2012-06-01 22:12 Zac Medico
2012-05-16 19:44 Zac Medico
2012-05-16  4:55 Zac Medico
2012-05-12  1:34 Zac Medico
2012-05-11 22:54 Zac Medico
2012-05-11 21:04 Zac Medico
2012-05-10 19:56 Arfrever Frehtes Taifersar Arahesis
2012-05-09 22:08 Zac Medico
2012-05-09  8:13 Zac Medico
2012-04-22 22:11 Zac Medico
2012-04-05 19:54 Zac Medico
2012-04-03 15:39 Zac Medico
2012-04-03  6:52 Zac Medico
2012-03-21 19:26 Zac Medico
2012-03-19 18:33 Zac Medico
2012-03-19 17:00 Zac Medico
2012-02-17 21:35 Arfrever Frehtes Taifersar Arahesis
2012-02-13 23:45 Zac Medico
2011-12-22 20:07 Zac Medico
2011-12-22 19:10 Zac Medico
2011-12-20  7:25 Zac Medico
2011-12-13 17:00 Zac Medico
2011-12-10 22:19 Zac Medico
2011-12-10 17:49 Zac Medico
2011-12-10 17:40 Zac Medico
2011-12-10  6:40 Zac Medico
2011-12-10  6:07 Zac Medico
2011-12-09 23:16 Zac Medico
2011-11-29 16:25 Zac Medico
2011-11-26  2:57 Zac Medico
2011-11-18 21:11 Zac Medico
2011-11-18  5:16 Zac Medico
2011-11-18  3:26 Zac Medico
2011-11-09  2:41 Zac Medico
2011-10-29  4:21 Zac Medico
2011-10-28 22:06 Zac Medico
2011-10-28  2:16 Zac Medico
2011-10-28  2:04 Zac Medico
2011-10-24 22:26 Zac Medico
2011-10-18  7:22 Zac Medico
2011-10-18  6:27 Zac Medico
2011-10-14  6:40 Zac Medico
2011-10-14  6:24 Zac Medico
2011-10-13 20:58 Zac Medico
2011-10-11 20:59 Zac Medico
2011-10-11 17:27 Zac Medico
2011-09-28 13:47 Zac Medico
2011-09-27  2:10 Zac Medico
2011-09-23  0:17 Zac Medico
2011-09-17  5:50 Zac Medico
2011-09-15  5:34 Zac Medico
2011-09-15  5:31 Zac Medico
2011-09-15  2:44 Zac Medico
2011-09-14 17:09 Zac Medico
2011-09-14 16:23 Zac Medico
2011-09-13  5:01 Zac Medico
2011-09-13  4:33 Zac Medico
2011-09-12  1:38 Zac Medico
2011-09-01  6:50 Zac Medico
2011-08-31  0:49 Zac Medico
2011-08-30 17:03 Zac Medico
2011-08-29 18:04 Arfrever Frehtes Taifersar Arahesis
2011-08-29  0:05 Zac Medico
2011-08-28 21:05 Zac Medico
2011-08-28 19:55 Arfrever Frehtes Taifersar Arahesis
2011-08-13 12:55 Zac Medico
2011-08-09  0:14 Zac Medico
2011-08-07  5:59 Zac Medico
2011-07-27  9:53 Zac Medico
2011-07-14 21:54 Zac Medico
2011-07-14  1:31 Zac Medico
2011-07-14  1:25 Zac Medico
2011-07-14  0:57 Zac Medico
2011-07-14  0:37 Zac Medico
2011-07-13 17:08 Zac Medico
2011-07-12 23:40 Zac Medico
2011-07-12 20:04 Zac Medico
2011-07-11 16:22 Zac Medico
2011-07-11 15:22 Zac Medico
2011-07-07 17:22 Zac Medico
2011-07-07  7:00 Zac Medico
2011-06-30  7:35 Zac Medico
2011-06-30  6:57 Zac Medico
2011-06-30  2:10 Zac Medico
2011-06-27  2:32 Zac Medico
2011-06-25  5:42 Zac Medico
2011-06-21  0:44 Zac Medico
2011-06-17 19:41 Zac Medico
2011-06-17 19:27 Zac Medico
2011-06-16 19:27 Zac Medico
2011-06-13 15:26 Zac Medico
2011-06-13 13:41 Zac Medico
2011-06-11  0:02 Arfrever Frehtes Taifersar Arahesis
2011-06-09 13:58 Zac Medico
2011-06-09 13:14 Zac Medico
2011-06-06 10:30 Zac Medico
2011-06-06 10:10 Zac Medico
2011-06-06  9:11 Zac Medico
2011-05-24  3:02 Zac Medico
2011-05-09 22:34 Zac Medico
2011-04-28 21:32 Zac Medico
2011-03-04 16:41 Zac Medico
2011-02-04 17:23 zmedico
2011-02-04 17:18 zmedico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox