equery meta needs to be updated to process projects and not herds in accordance with GLEP 67
A local patch I hacked up that might do the trick: --- /usr/lib64/python2.7/site-packages/gentoolkit/metadata.py 2012-12-20 11:43:22.000000000 +0000 +++ gentoolkit-fix 2016-02-11 18:50:58.743441714 +0000 @@ -229,7 +229,7 @@ """ result = [] - for elem in self._xml_tree.findall('herd'): + for elem in self._xml_tree.findall("./maintainer/[@type='project']"): text = elem.text if text is None: text = '' @@ -267,7 +267,7 @@ return self._maintainers self._maintainers = [] - for node in self._xml_tree.findall('maintainer'): + for node in self._xml_tree.findall("./maintainer/[@type='person']"): self._maintainers.append(_Maintainer(node)) return self._maintainers
Any reason not to reuse portage.xml.metadata module?
(In reply to Michał Górny from comment #2) > Any reason not to reuse portage.xml.metadata module? I recall that the original intent was to use portage.xml.metadata, but at the time it didn't do everything that was needed. It is probably time to re-look at it.
Actually the portage.xml.metadata routines came from gentoolkit (compare the code, I think Zac has made a few minor changes to it from the original gentoolkit code). We intended to migrate to it instead as that way it is only one location to edit. But we haven't seemed to get "a round To-It" ;) So go ahead and update portage's code and have gentoolkit use it.
Portage's metadata handling code still references herds.xml instead of projects.xml. I've migrated equery to use portage's MetaDataXML class, passing it the projects.xml filepath instead of the herds.xml like emerge code still does. But this does not affect maintainer listings as the needed info is already listed in metadata.xml. I plan to add a projects listing capability at some future date.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=eb9a4d026ef453e392faff35925537bee74c9d80 commit eb9a4d026ef453e392faff35925537bee74c9d80 Author: Brian Dolbec <dolsen@gentoo.org> AuthorDate: 2022-07-10 07:45:34 +0000 Commit: Brian Dolbec <dolsen@gentoo.org> CommitDate: 2022-07-10 07:49:28 +0000 equery meta: Migrate to portage's MetadataXML class Portage's metadata handling code was originally ported from gentoolkit. Finally get around to migrating, eliminating duplicate code. Bug: https://bugs.gentoo.org/573030 Signed-off-by: Brian Dolbec <dolsen@gentoo.org> pym/gentoolkit/metadata.py | 256 --------------------------------------------- pym/gentoolkit/package.py | 10 +- 2 files changed, 7 insertions(+), 259 deletions(-)