public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH 3/4] Remove UNUSED* auxdbkeys
  @ 2021-09-03 16:35 99% ` Michał Górny
  0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2021-09-03 16:35 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

The UNUSED* auxdbkeys are a relict of old metadata cache format that
required a fixed number of lines.  This format is no longer supported
by Portage, and all uses of auxdbkeys strip UNUSED values, so just
remove them entirely.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 bin/portageq                   | 3 +--
 lib/_emerge/Package.py         | 3 +--
 lib/portage/__init__.py        | 4 +---
 lib/portage/dbapi/__init__.py  | 3 +--
 repoman/lib/repoman/qa_data.py | 2 +-
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/bin/portageq b/bin/portageq
index 385259f9d..d3cb9f140 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -238,8 +238,7 @@ docstrings['metadata'] = """
 <eroot> <pkgtype> <category/package> [<key>]+
 Returns metadata values for the specified package.
 Available keys: %s
-"""  % ','.join(sorted(x for x in portage.auxdbkeys \
-if not x.startswith('UNUSED_')))
+"""  % ','.join(sorted(x for x in portage.auxdbkeys))
 metadata.__doc__ = docstrings['metadata']
 
 
diff --git a/lib/_emerge/Package.py b/lib/_emerge/Package.py
index e8809a89d..4e25619ae 100644
--- a/lib/_emerge/Package.py
+++ b/lib/_emerge/Package.py
@@ -791,8 +791,7 @@ class Package(Task):
 			pkg = self
 		return pkg
 
-_all_metadata_keys = set(x for x in portage.auxdbkeys \
-	if not x.startswith("UNUSED_"))
+_all_metadata_keys = set(x for x in portage.auxdbkeys)
 _all_metadata_keys.update(Package.metadata_keys)
 _all_metadata_keys = frozenset(_all_metadata_keys)
 
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 6e22a174b..232d77f0e 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -519,10 +519,8 @@ auxdbkeys = (
 	'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
 	'KEYWORDS',  'INHERITED', 'IUSE', 'REQUIRED_USE',
 	'PDEPEND',   'BDEPEND', 'EAPI',
-	'PROPERTIES', 'DEFINED_PHASES', 'IDEPEND', 'UNUSED_04',
-	'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
+	'PROPERTIES', 'DEFINED_PHASES', 'IDEPEND',
 )
-auxdbkeylen = len(auxdbkeys)
 
 def portageexit():
 	pass
diff --git a/lib/portage/dbapi/__init__.py b/lib/portage/dbapi/__init__.py
index d7facc9b6..3caefb816 100644
--- a/lib/portage/dbapi/__init__.py
+++ b/lib/portage/dbapi/__init__.py
@@ -28,8 +28,7 @@ class dbapi:
 	_category_re = re.compile(r'^\w[-.+\w]*$', re.UNICODE)
 	_categories = None
 	_use_mutable = False
-	_known_keys = frozenset(x for x in auxdbkeys
-		if not x.startswith("UNUSED_0"))
+	_known_keys = frozenset(auxdbkeys)
 	_pkg_str_aux_keys = ("EAPI", "KEYWORDS", "SLOT", "repository")
 
 	def __init__(self):
diff --git a/repoman/lib/repoman/qa_data.py b/repoman/lib/repoman/qa_data.py
index afb403d8d..4785581e2 100644
--- a/repoman/lib/repoman/qa_data.py
+++ b/repoman/lib/repoman/qa_data.py
@@ -79,7 +79,7 @@ class QAData:
 
 		self.missingvars = qadata.get("missingvars", [])
 		logging.debug("QAData: missingvars: %s", self.missingvars)
-		self.allvars = set(x for x in portage.auxdbkeys if not x.startswith("UNUSED_"))
+		self.allvars = set(portage.auxdbkeys)
 		self.allvars.update(Package.metadata_keys)
 		self.allvars = sorted(self.allvars)
 
-- 
2.33.0



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-03 16:35     [gentoo-portage-dev] [PATCH 0/4] Modernize metadata passing & add INHERIT to md5-cache Michał Górny
2021-09-03 16:35 99% ` [gentoo-portage-dev] [PATCH 3/4] Remove UNUSED* auxdbkeys Michał Górny

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