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

end of thread, other threads:[~2020-08-03 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-28  5:04 [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2020-08-03 21:42 Zac Medico
2020-04-12 23:46 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