public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: man/, lib/portage/package/ebuild/
@ 2020-09-08  0:47 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2020-09-08  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     16262dc8ab9ab6cc03565bcefc444726b4dfb32f
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Sep  5 22:37:05 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 00:47:14 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=16262dc8

make.conf: Treat __* variables as local and do not propagate them.

Bug: https://bugs.gentoo.org/740588
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/config.py | 6 ++++++
 man/make.conf.5                      | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index b62ad3069..a09fdbced 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -370,6 +370,9 @@ class config:
 					_("Found 2 make.conf files, using both '%s' and '%s'") %
 					tuple(make_conf_paths), noiselevel=-1)
 
+			# __* variables set in make.conf are local and are not be propagated.
+			make_conf = {k: v for k, v in make_conf.items() if not k.startswith("__")}
+
 			# Allow ROOT setting to come from make.conf if it's not overridden
 			# by the constructor argument (from the calling environment).
 			locations_manager.set_root_override(make_conf.get("ROOT"))
@@ -621,6 +624,9 @@ class config:
 					tolerant=tolerant, allow_sourcing=True,
 					expand=expand_map, recursive=True) or {})
 
+			# __* variables set in make.conf are local and are not be propagated.
+			mygcfg = {k: v for k, v in mygcfg.items() if not k.startswith("__")}
+
 			# Don't allow the user to override certain variables in make.conf
 			profile_only_variables = self.configdict["defaults"].get(
 				"PROFILE_ONLY_VARIABLES", "").split()

diff --git a/man/make.conf.5 b/man/make.conf.5
index 1b997ad37..8a1ea0603 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Jun 2020" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Sep 2020" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -36,6 +36,8 @@ make.defaults to make.globals to make.conf to the environment
 settings.  Clearing these variables requires a clear\-all as in:
 export USE="\-*"
 .br
+__* variables set in make.conf are local and are not be propagated.
+.br
 In order to create per\-package environment settings, refer to
 \fBpackage.env\fR in \fBportage\fR(5).
 .SH "VARIABLES"


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

* [gentoo-commits] proj/portage:master commit in: man/, lib/portage/package/ebuild/
@ 2021-01-10  3:24 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2021-01-10  3:24 UTC (permalink / raw
  To: gentoo-commits

commit:     f04dae7728b558ba10b99d1b4979054825fbb0d6
Author:     Daniel M. Weeks <dan <AT> danweeks <DOT> net>
AuthorDate: Wed Jan  6 18:35:37 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 03:22:43 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f04dae77

Make digests available to fetch command

This makes it possible for the fetch command to utilize a
protocol/service that identifies files by their hash.

Closes: https://github.com/gentoo/portage/pull/655
Signed-off-by: Daniel M. Weeks <dan <AT> danweeks.net>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/fetch.py |  6 ++++++
 man/make.conf.5                     | 14 +++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index 7be9d0239..e0fecaf23 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -1291,6 +1291,12 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 						"FILE":    os.path.basename(download_path)
 					}
 
+					try:
+						variables['DIGESTS'] = " ".join(["%s:%s" % (k.lower(), v)
+							for k, v in mydigests[myfile].items() if k != 'size'])
+					except KeyError:
+						pass
+
 					for k in ("DISTDIR", "PORTAGE_SSH_OPTS"):
 						v = mysettings.get(k)
 						if v is not None:

diff --git a/man/make.conf.5 b/man/make.conf.5
index 494d5a212..f6eae6f60 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Sep 2020" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Jan 2021" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -746,6 +746,18 @@ the internet.  It must contain the full path to the executable as well as the
 place\-holders \\${DISTDIR}, \\${FILE} and \\${URI}.  The command should be
 written to place the fetched file at \\${DISTDIR}/\\${FILE}.
 Also see \fBRESUMECOMMAND\fR.
+.RS
+.TP
+.B Optional FETCHCOMMAND Placeholders
+.TS
+l l l
+___
+l l l.
+Placeholder	Meaning	Example
+
+\\${DIGESTS}	Space separated list of file digests	blake2b <hexdigest> sha512 <hexdigest>
+.TE
+.RE
 .TP
 .B FFLAGS FCFLAGS
 Use these variables to set the desired optimization/CPU instruction settings


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

end of thread, other threads:[~2021-01-10  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-08  0:47 [gentoo-commits] proj/portage:master commit in: man/, lib/portage/package/ebuild/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2021-01-10  3:24 Zac Medico

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