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

commit:     836c5ba9352ef1fa2c14d29e8876533a9db72465
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 17 19:59:08 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug 17 22:40:09 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=836c5ba9

LocationsManager: map empty root var to / (bug 663904)

When ROOT or PORTAGE_CONFIGROOT is entirely empty, map
the value to / since otherwise is becomes the current
working directory which gives undesirable results.

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

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

diff --git a/lib/portage/package/ebuild/_config/LocationsManager.py b/lib/portage/package/ebuild/_config/LocationsManager.py
index f7d7209ff..75320258f 100644
--- a/lib/portage/package/ebuild/_config/LocationsManager.py
+++ b/lib/portage/package/ebuild/_config/LocationsManager.py
@@ -60,7 +60,7 @@ class LocationsManager(object):
 			self.config_root = portage.const.EPREFIX + os.sep
 
 		self.config_root = normalize_path(os.path.abspath(
-			self.config_root)).rstrip(os.path.sep) + os.path.sep
+			self.config_root or os.sep)).rstrip(os.sep) + os.sep
 
 		self._check_var_directory("PORTAGE_CONFIGROOT", self.config_root)
 		self.abs_user_config = os.path.join(self.config_root, USER_CONFIG_PATH)
@@ -304,8 +304,7 @@ class LocationsManager(object):
 			self.target_root = root_overwrite
 			if not self.target_root.strip():
 				self.target_root = None
-		if self.target_root is None:
-			self.target_root = "/"
+		self.target_root = self.target_root or os.sep
 
 		self.target_root = normalize_path(os.path.abspath(
 			self.target_root)).rstrip(os.path.sep) + os.path.sep


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2019-05-20 19:47 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2019-05-20 19:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b7c510f76d83ef70738b03a925ffb4a36797750d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 18:45:54 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 20 19:12:58 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b7c510f7

Fix ACCEPT_LICENSE="-*" to behave as intended (bug 686406)

Fix prune_incremental to preserve the last -*, since otherwise an
empty value would trigger fallback to a default value. This ensures
that ACCEPT_LICENSE="-*" behaves as intended.

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

 lib/portage/package/ebuild/_config/helper.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/_config/helper.py b/lib/portage/package/ebuild/_config/helper.py
index ee0c090a0..03eba2cc4 100644
--- a/lib/portage/package/ebuild/_config/helper.py
+++ b/lib/portage/package/ebuild/_config/helper.py
@@ -57,7 +57,9 @@ def prune_incremental(split):
 			break
 		elif x == '-*':
 			if i == 0:
-				split = []
+				# Preserve the last -*, since otherwise an empty value
+				# would trigger fallback to a default value.
+				split = ['-*']
 			else:
 				split = split[-i:]
 			break


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2020-01-23  6:04 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2020-01-23  6:04 UTC (permalink / raw
  To: gentoo-commits

commit:     7e50a057958624dd728e858a3c07517240f85d02
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 06:06:27 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 06:01:14 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7e50a057

UserWarning if /etc/portage/package.keywords exists

The /etc/portage/package.keywords file has been long deprecated
in favor of /etc/portage/package.accept_keywords. The file would
be useful if we could make it behave like package.keywords in
profiles (see bug 491166), but it's safest if we trigger a
UserWarning for some time before we change the meaning in a
future version of portage. The message looks like this:

UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead

Bug: https://bugs.gentoo.org/491166
Bug: https://bugs.gentoo.org/607852
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/_config/KeywordsManager.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/portage/package/ebuild/_config/KeywordsManager.py b/lib/portage/package/ebuild/_config/KeywordsManager.py
index fd0a6318d..1c12ce58e 100644
--- a/lib/portage/package/ebuild/_config/KeywordsManager.py
+++ b/lib/portage/package/ebuild/_config/KeywordsManager.py
@@ -5,6 +5,8 @@ __all__ = (
 	'KeywordsManager',
 )
 
+import warnings
+
 from _emerge.Package import Package
 from portage import os
 from portage.dep import ExtendedAtomDict, _repo_separator, _slot_separator
@@ -54,13 +56,20 @@ class KeywordsManager(object):
 		self.pkeywordsdict = ExtendedAtomDict(dict)
 
 		if user_config:
+			user_accept_kwrds_path = os.path.join(abs_user_config, "package.accept_keywords")
+			user_kwrds_path = os.path.join(abs_user_config, "package.keywords")
 			pkgdict = grabdict_package(
-				os.path.join(abs_user_config, "package.keywords"),
+				user_kwrds_path,
 				recursive=1, allow_wildcard=True, allow_repo=True,
 				verify_eapi=False, allow_build_id=True)
 
+			if pkgdict:
+				warnings.warn(_("%s is deprecated, use %s instead") %
+					(user_kwrds_path, user_accept_kwrds_path),
+					UserWarning)
+
 			for k, v in grabdict_package(
-				os.path.join(abs_user_config, "package.accept_keywords"),
+				user_accept_kwrds_path,
 				recursive=1, allow_wildcard=True, allow_repo=True,
 				verify_eapi=False, allow_build_id=True).items():
 				pkgdict.setdefault(k, []).extend(v)


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2020-01-28  5:04 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2020-01-28  5:04 UTC (permalink / raw
  To: gentoo-commits

commit:     af5b57ee4d3133d9a8ca2c16aa21b7176026c8cd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 05:01:27 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 05:02:36 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=af5b57ee

Suppress /etc/portage/package.keywords warning for API consumers

Suggested-by: Jeroen Roovers <jer <AT> gentoo.org>
Bug: https://bugs.gentoo.org/706298
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

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

diff --git a/lib/portage/package/ebuild/_config/KeywordsManager.py b/lib/portage/package/ebuild/_config/KeywordsManager.py
index 1c12ce58e..48397b022 100644
--- a/lib/portage/package/ebuild/_config/KeywordsManager.py
+++ b/lib/portage/package/ebuild/_config/KeywordsManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = (
@@ -8,6 +8,7 @@ __all__ = (
 import warnings
 
 from _emerge.Package import Package
+import portage
 from portage import os
 from portage.dep import ExtendedAtomDict, _repo_separator, _slot_separator
 from portage.localization import _
@@ -63,7 +64,7 @@ class KeywordsManager(object):
 				recursive=1, allow_wildcard=True, allow_repo=True,
 				verify_eapi=False, allow_build_id=True)
 
-			if pkgdict:
+			if pkgdict and portage._internal_caller:
 				warnings.warn(_("%s is deprecated, use %s instead") %
 					(user_kwrds_path, user_accept_kwrds_path),
 					UserWarning)


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2020-04-12 23:46 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2020-04-12 23:46 UTC (permalink / raw
  To: gentoo-commits

commit:     5570a96ddc859851036035baa4da65df2daa51a0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 12 23:11:06 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr 12 23:45:31 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5570a96d

special_env_vars: add ENV_UNSET to environ_whitelist (bug 700830)

Add ENV_UNSET to the environ_whitelist. Since DISPLAY is also in
the environ_whitelist, ENV_UNSET must also be in environ_whitelist
in order to unset DISPLAY.

Fixes: a5e02c92fd72 ("Support ENV_UNSET for EAPI 7")
Bug: https://bugs.gentoo.org/700830
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/_config/special_env_vars.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py
index dc01339f7..440dd00b2 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -47,7 +47,7 @@ environ_whitelist += [
 	"DISTDIR", "DOC_SYMLINKS_DIR", "EAPI", "EBUILD",
 	"EBUILD_FORCE_TEST",
 	"EBUILD_PHASE", "EBUILD_PHASE_FUNC", "ECLASSDIR", "ECLASS_DEPTH", "ED",
-	"EMERGE_FROM", "EPREFIX", "EROOT", "ESYSROOT",
+	"EMERGE_FROM", "ENV_UNSET", "EPREFIX", "EROOT", "ESYSROOT",
 	"FEATURES", "FILESDIR", "HOME", "MERGE_TYPE", "NOCOLOR", "PATH",
 	"PKGDIR",
 	"PKGUSE", "PKG_LOGDIR", "PKG_TMPDIR",


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2020-08-03 21:42 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2020-08-03 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     1eb1b4977f1ba79d0a31aacd5683423a022767ad
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  3 20:20:17 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug  3 21:15:27 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1eb1b497

lib/portage/package/ebuild/_config/KeywordsManager.py: drop unused-import

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

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

diff --git a/lib/portage/package/ebuild/_config/KeywordsManager.py b/lib/portage/package/ebuild/_config/KeywordsManager.py
index 136f57c35..de9cdaede 100644
--- a/lib/portage/package/ebuild/_config/KeywordsManager.py
+++ b/lib/portage/package/ebuild/_config/KeywordsManager.py
@@ -7,13 +7,12 @@ __all__ = (
 
 import warnings
 
-from _emerge.Package import Package
 import portage
 from portage import os
-from portage.dep import ExtendedAtomDict, _repo_separator, _slot_separator
+from portage.dep import ExtendedAtomDict
 from portage.localization import _
 from portage.package.ebuild._config.helper import ordered_by_atom_specificity
-from portage.util import grabdict_package, stack_lists, writemsg
+from portage.util import grabdict_package, stack_lists
 from portage.versions import _pkg_str
 
 class KeywordsManager:


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2025-05-13 15:23 Mike Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2025-05-13 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     76fdf0afc691b2ff3ad78cc61d0befa941737d6e
Author:     Harrison <contact <AT> htv04 <DOT> com>
AuthorDate: Wed Apr 30 18:07:34 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue May 13 15:22:29 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=76fdf0af

Remove LD_PRELOAD environment variable mask

This pull request removes LD_PRELOAD from the environment variables
masked by Portage.

* Portage's sandbox appears to support prepending to an existing
  LD_PRELOAD: https://github.com/gentoo/sandbox/blob/7240cc9fb7cd6a9bc83b9ade5a385633f42e58d1/data/sandbox.bashrc#L4-L8
* When the sandbox is disabled, LD_PRELOAD doesn't appear to be used
  at all by Portage.

However, Portage currently masks LD_PRELOAD, nullifying this
functionality. Having LD_PRELOAD as a Portage variable can be useful
for various reasons, in my specific case using a custom allocator when
supported by the build process.

I have tested this myself and it appears to work properly for the
above use case, with and without the sandbox enabled (although the
sandbox has its own custom allocator).

Signed-off-by: Harrison <contact <AT> htv04.com>
Closes: https://github.com/gentoo/portage/pull/1435
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 lib/portage/package/ebuild/_config/special_env_vars.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py
index 55e5111ef0..cb78ddc347 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -112,6 +112,7 @@ environ_whitelist = frozenset(
         "FEATURES",
         "FILESDIR",
         "HOME",
+        "LD_PRELOAD",
         "MAKEFLAGS",
         "MERGE_TYPE",
         "NOCOLOR",


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2025-08-25  9:52 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2025-08-25  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     5eafc6b22479d263b46f2f9cda5ccb46acb62c54
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jul 28 17:57:10 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 25 09:51:35 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5eafc6b2

special_env_vars.py: add GLOBSORT to the environ_filter set

The traditional behaviour of bash has been to sort the words produced by
pathname expansion by name, in ascending lexicographical order, and in
accordance with the collation defined by the 'LC_COLLATE' variable.
However, bash-5.3 introduces the new 'GLOBSORT' variable which provides
a means of controlling how the words are sorted. For example, setting
GLOBSORT="-mtime" will sort by reverse order of modification time.

Given that bash is capable of inheriting this variable from its process
environment, portage must not be allowed to propagate the variable to
the "ebuild.sh" utility or any other programs that it executes. To that
end, incorporate the 'GLOBSORT' variable into the 'environ_filter' set
defined by the "special_env_vars.py" unit.

See-also: 8a607ed23beb4995627f9c4e2c7580469ace56bb
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/package/ebuild/_config/special_env_vars.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py
index 17f7bf0f76..e4cfc727fc 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -265,6 +265,7 @@ environ_filter = frozenset(
         "MANPATH",
         "USER",
         # variables that break bash
+        "GLOBSORT",
         "HISTFILE",
         "POSIXLY_CORRECT",
         # portage config variables and variables set directly by portage


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
@ 2025-08-25  9:52 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2025-08-25  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4cf0144f2b931f93146734c0c866f727c8e0369c
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jul 28 16:51:38 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 25 09:51:34 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4cf0144f

special_env_vars.py: add {FETCH,RESUME}COMMAND_SSH to the environ_filter set

Portage is supposed to prevent configuration variables in both the
FETCHCOMMAND_ and RESUMECOMMAND_ namespaces from being propagated to the
environment of the "ebuild.sh" utility and its subprocesses. To that
end, the "special_env_vars.py" unit defines the 'environ_filter' set,
which includes the following twelve variables among its members.

- FETCHCOMMAND
- FETCHCOMMAND_FTP
- FETCHCOMMAND_HTTP
- FETCHCOMMAND_HTTPS
- FETCHCOMMAND_RSYNC
- FETCHCOMMAND_SFTP
- RESUMECOMMAND
- RESUMECOMMAND_FTP
- RESUMECOMMAND_HTTP
- RESUMECOMMAND_HTTPS
- RESUMECOMMAND_RSYNC
- RESUMECOMMAND_SFTP

However, it does not account for the fact that the SSH protocol is
supported. Address this by incorporating both the 'FETCHCOMMAND_SSH' and
'RESUMECOMMAND_SSH' variables into the set. Assuming their default
values, this saves 568 bytes of environment space, as well as preventing
them from unnecessarily leaking into "environment.bz2" files.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/package/ebuild/_config/special_env_vars.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py
index a8e3c11419..17f7bf0f76 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -289,6 +289,7 @@ environ_filter = frozenset(
         "FETCHCOMMAND_HTTPS",
         "FETCHCOMMAND_RSYNC",
         "FETCHCOMMAND_SFTP",
+        "FETCHCOMMAND_SSH",
         "GENTOO_MIRRORS",
         "NOCONFMEM",
         "O",
@@ -330,6 +331,7 @@ environ_filter = frozenset(
         "RESUMECOMMAND_HTTPS",
         "RESUMECOMMAND_RSYNC",
         "RESUMECOMMAND_SFTP",
+        "RESUMECOMMAND_SSH",
         "UNINSTALL_IGNORE",
         "USE_EXPAND_HIDDEN",
         "USE_ORDER",


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

end of thread, other threads:[~2025-08-25  9:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25  9:52 [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2025-08-25  9:52 Sam James
2025-05-13 15:23 Mike Gilbert
2020-08-03 21:42 Zac Medico
2020-04-12 23:46 Zac Medico
2020-01-28  5:04 Zac Medico
2020-01-23  6:04 Zac Medico
2019-05-20 19:47 Zac Medico
2018-08-17 23:13 Zac Medico

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