public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-02-05 12:25 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 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:     Fabian Groffen <grobian <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=cc26e6ee

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] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-02-05 12:25 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 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:     Fabian Groffen <grobian <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=7af8dcf3

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] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-12-02 20:27 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-12-02 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ecc16f6f8ecdc4f67a72aedfe72abaad1ab5a58e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 20:26:28 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 20:26:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ecc16f6f

_doebuild_path: initialise path before use

NameError: global name 'path' is not defined

---
 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 e2c5392..4df632d 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -130,6 +130,7 @@ def _doebuild_path(settings, eapi=None):
 	# PREFIX LOCAL: use DEFAULT_PATH and EXTRA_PATH from make.globals
 	defaultpath = [x for x in settings.get("DEFAULT_PATH", "").split(":") if x]
 	extrapath = [x for x in settings.get("EXTRA_PATH", "").split(":") if x]
+	path = []
 
 	if eapi not in (None, "0", "1", "2", "3"):
 		path.append(os.path.join(portage_bin_path, "ebuild-helpers", "4"))



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-12-10 12:55 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-12-10 12:55 UTC (permalink / raw
  To: gentoo-commits

commit:     ac3bbd986755acb020f71c1a204ebe87f219200c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 12:54:51 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 12:54:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ac3bbd98

config: remove destructive user/grpname guessing

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

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 89a2eb1..fb2167c 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -732,34 +732,40 @@ class config(object):
 				"PORTAGE_INST_UID": "0",
 			}
 
-			if eprefix:
-				# For prefix environments, default to the UID and GID of
-				# the top-level EROOT directory.
-				try:
-					eroot_st = os.stat(eroot)
-				except OSError:
-					pass
-				else:
-					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")
+			# PREFIX LOCAL: inventing UID/GID based on a path is a very
+			# bad idea, it breaks almost everything since group ids
+			# don't have to match, when a user has many
+			# This in particularly breaks the configure-set portage
+			# group and user (in portage/data.py)
+			#if eprefix:
+			#	# For prefix environments, default to the UID and GID of
+			#	# the top-level EROOT directory.
+			#	try:
+			#		eroot_st = os.stat(eroot)
+			#	except OSError:
+			#		pass
+			#	else:
+			#		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")
+			# END PREFIX LOCAL
 
 			for var, default_val in default_inst_ids.items():
 				try:



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-12-23 11:04 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-12-23 11:04 UTC (permalink / raw
  To: gentoo-commits

commit:     8d1a3a68990967c3f8d6caa897cb90bb617eeba4
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 11:01:28 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec 23 11:01:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8d1a3a68

spawn: fix Python syntax and so on

---
 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 083e0ce..194cdbf 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -18,6 +18,7 @@ from textwrap import wrap
 import time
 import warnings
 import zlib
+import platform
 
 import portage
 portage.proxy.lazyimport.lazyimport(globals(),
@@ -1409,7 +1410,7 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
 		keywords["opt_name"] += " fakeroot"
 		keywords["fakeroot_state"] = os.path.join(mysettings["T"], "fakeroot.state")
 		spawn_func = portage.process.spawn_fakeroot
-	elif sandbox and platform.system() == 'Darwin':
+	elif "sandbox" in features and platform.system() == 'Darwin':
 		keywords["opt_name"] += " macossandbox"
 		sbprefixpath = mysettings["PORTAGE_BUILDDIR"]
 



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2011-12-23 11:04 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2011-12-23 11:04 UTC (permalink / raw
  To: gentoo-commits

commit:     1fab5e857885447ba381f44ece8d3f750bbe9b71
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 11:04:02 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec 23 11:04:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1fab5e85

sandbox: finish removal of macossandbox

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

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 1d69f9d..aea3600 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -927,7 +927,7 @@ class config(object):
 			writemsg("!!! /etc/portage/profile/virtuals. Please move it to\n")
 			writemsg("!!! this new location.\n\n")
 
-		if not sandbox_capable and \
+		if not sandbox_capable and not macossandbox_capable and \
 			("sandbox" in self.features or "usersandbox" in self.features):
 			if self.profile_path is not None and \
 				os.path.realpath(self.profile_path) == \
@@ -939,18 +939,6 @@ class config(object):
 				writemsg(colorize("BAD", _("!!! Problem with sandbox"
 					" binary. Disabling...\n\n")), noiselevel=-1)
 
-		if not macossandbox_capable and \
-			("macossandbox" in self.features or "macosusersandbox" in self.features):
-			if self.profile_path is not None and \
-				os.path.realpath(self.profile_path) == \
-				os.path.realpath(os.path.join(
-				self["PORTAGE_CONFIGROOT"], PROFILE_PATH)):
-				""" Don't show this warning when running repoman and the
-				sandbox feature came from a profile that doesn't belong to
-				the user."""
-				writemsg(colorize("BAD", "!!! Problem with macos sandbox" + \
-					" binary. Disabling...\n\n"), noiselevel=-1)
-
 		if "fakeroot" in self.features and \
 			not fakeroot_capable:
 			writemsg(_("!!! FEATURES=fakeroot is enabled, but the "



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2012-02-09  8:16 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2012-02-09  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     12b07d61f9b7dc85a4d2bf3a0fa75f161be9dcab
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  9 08:16:01 2012 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Feb  9 08:16:01 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=12b07d61

_post_phase_cmds: fix syntax

---
 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 dd804f4..15beb90 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1507,7 +1507,7 @@ _post_phase_cmds = {
 		"preinst_sfperms",
 		"preinst_selinux_labels",
 		"preinst_suid_scan",
-		]
+		],
 
 	"postinst" : [
 		"postinst_aix"]



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2013-12-15  7:56 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2013-12-15  7:56 UTC (permalink / raw
  To: gentoo-commits

commit:     d941e02bac17ae1a258d9df6de4d25987dda0b59
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 07:54:52 2013 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 07:54:52 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d941e02b

_spawn_actionmap: fix logic such that nosandbox doesn't always evaluate to True

---
 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 691ef97..374cc9a 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1311,10 +1311,8 @@ def _spawn_actionmap(settings):
 		nosandbox = ("sandbox" not in features and \
 			"usersandbox" not in features)
 
-	if not portage.process.sandbox_capable:
-		nosandbox = True
-
-	if not portage.process.macossandbox_capable:
+	if not (portage.process.sandbox_capable or \
+		portage.process.macossandbox_capable):
 		nosandbox = True
 
 	sesandbox = settings.selinux_enabled() and \


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2014-02-04 20:29 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2014-02-04 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     9e892c77acd73757e539548346672217ab8bd976
Author:     Ruud Koolen <redlizard <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  4 20:28:09 2014 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Feb  4 20:28:09 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9e892c77

doebuild_environment: don't set EPREFIX

`mysettings` is a config object, which initializes a value of EPREFIX in
its constructor (pym/portage/package/ebuild/config.py:489), and it is
this value that should be used, not the constant one.

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

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 374cc9a..2f08593 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -319,7 +319,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
 		# due to how it's coded... Don't overwrite this so we can use it.
 		mysettings["PORTAGE_DEBUG"] = "1"
 
-	mysettings["EPREFIX"]  = EPREFIX
 	mysettings["EBUILD"]   = ebuild_path
 	mysettings["O"]        = pkg_dir
 	mysettings.configdict["pkg"]["CATEGORY"] = cat


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2015-06-09 19:53 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2015-06-09 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     edc74d877c90e3b4aaabab3d12d81cbdb466dc98
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  9 19:27:24 2015 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jun  9 19:27:24 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=edc74d87

config: define necessary variables

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

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 18e95ff..489fe25 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -862,8 +862,8 @@ class config(object):
 			# don't have to match, when a user has many
 			# This in particularly breaks the configure-set portage
 			# group and user (in portage/data.py)
-#			eroot_or_parent = first_existing(eroot)
-#			unprivileged = False
+			eroot_or_parent = first_existing(eroot)
+			unprivileged = False
 #			try:
 #				eroot_st = os.stat(eroot_or_parent)
 #			except OSError:


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2015-06-09 19:53 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2015-06-09 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     d008314db6dd9f344cbad8955b83bfbed85d63a2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  9 19:51:15 2015 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jun  9 19:51:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d008314d

config: in Prefix be unprivileged

 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 489fe25..8712195 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -863,7 +863,7 @@ class config(object):
 			# This in particularly breaks the configure-set portage
 			# group and user (in portage/data.py)
 			eroot_or_parent = first_existing(eroot)
-			unprivileged = False
+			unprivileged = True
 #			try:
 #				eroot_st = os.stat(eroot_or_parent)
 #			except OSError:


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/
@ 2018-05-25 19:32 Fabian Groffen
  0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2018-05-25 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     dea5a0cb7e4723d554f7309043284b5c66f881f8
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat May 19 13:54:21 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat May 19 13:54:21 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=dea5a0cb

doebuild: fix deprecation warnings

This fixes:

DeprecationWarning: invalid escape sequence \*

 pym/portage/package/ebuild/doebuild.py | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index fff03e1d4..bdf1a2e9f 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1602,8 +1602,10 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 				user = "root"
 			elif portage_build_uid == portage_uid:
 				user = portage.data._portage_username
+			# PREFIX LOCAL: accept numeric uid
 			else:
 				user = portage_uid
+			# END PREFIX LOCAL
 		if user is not None:
 			mysettings["PORTAGE_BUILD_USER"] = user
 
@@ -1616,8 +1618,10 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 				group = "root"
 			elif portage_build_gid == portage_gid:
 				group = portage.data._portage_grpname
+			# PREFIX LOCAL: accept numeric gid
 			else:
 				group = portage_gid
+			# END PREFIX LOCAL
 		if group is not None:
 			mysettings["PORTAGE_BUILD_GROUP"] = group
 
@@ -1674,11 +1678,13 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 			rules_literal = ""
 			rules_regex = ""
 
-			# FIXME: Allow for quoting inside the variable to allow paths with
-			# spaces in them?
+			# FIXME: Allow for quoting inside the variable
+			# to allow paths with spaces in them?
 			for path in paths.split(" "):
-				# do a second round of token replacements to be able to
-				# reference settings like EPREFIX or PORTAGE_BUILDDIR.
+				# do a second round of token
+				# replacements to be able to reference
+				# settings like EPREFIX or
+				# PORTAGE_BUILDDIR.
 				for token in path.split("@@")[1:-1:2]:
 					if token not in mysettings:
 						continue
@@ -1686,16 +1692,19 @@ def spawn(mystring, mysettings, debug=False, free=False, droppriv=False,
 					path = path.replace("@@%s@@" % token, mysettings[token])
 
 				if "@@" in path:
-					# unreplaced tokens left - silently ignore path - needed
-					# for PORTAGE_ACTUAL_DISTDIR which isn't always set
+					# unreplaced tokens left -
+					# silently ignore path - needed
+					# for PORTAGE_ACTUAL_DISTDIR
+					# which isn't always set
 					pass
 				elif path[-1] == os.sep:
-					# path ends in slash - make it a regex and allow access
+					# path ends in slash - make it a
+					# regex and allow access
 					# recursively.
-					path = path.replace("+", "\+")
-					path = path.replace("*", "\*")
-					path = path.replace("[", "\[")
-					path = path.replace("[", "\[")
+					path = path.replace(r'+', r'\+')
+					path = path.replace(r'*', r'\*')
+					path = path.replace(r'[', r'\[')
+					path = path.replace(r']', r'\]')
 					rules_regex += "    #\"^%s\"\n" % path
 				else:
 					rules_literal += "    #\"%s\"\n" % path


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-05-25 19:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-10 12:55 [gentoo-commits] proj/portage:prefix commit in: pym/portage/package/ebuild/ Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2018-05-25 19:32 Fabian Groffen
2015-06-09 19:53 Fabian Groffen
2015-06-09 19:53 Fabian Groffen
2014-02-04 20:29 Fabian Groffen
2013-12-15  7:56 Fabian Groffen
2012-02-09  8:16 Fabian Groffen
2011-12-23 11:04 Fabian Groffen
2011-12-23 11:04 Fabian Groffen
2011-12-02 20:27 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
2011-02-05 12:25 Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox