Equery does not report the description listed in the ebuild file. Reproducible: Always Steps to Reproduce: 1. Ask equery for package description # equery m -d gentoopm * app-portage/gentoopm [gentoo] None specified 3. For workaround, grep the ebuild for the DESCRIPTION variable # equery w gentoopm /usr/portage/app-portage/gentoopm/gentoopm-0.2.6.ebuild # grep DESCRIPTION /usr/portage/app-portage/gentoopm/gentoopm-0.2.6.ebuild DESCRIPTION="A common interface to Gentoo package managers" Actual Results: Equery returns 'None specified' Expected Results: Equery should return the package description. In this case, it would be 'A common interface to Gentoo package managers'.
I just tested this with the latest live ebuild of gentoolkit and the issue is not fixed there. # equery w gentoopm /usr/portage/app-portage/gentoopm/gentoopm-0.2.6.ebuild # equery m -d gentoopm * app-portage/gentoopm [gentoo] None specified # equery -V equery (9999-f96e8dfc59ac1a4d7cc1bb296083561335e9a0e3) - Gentoo package query tool
Yes, we know about this problem. And we will work on it. I am currently busy with some other more important coding at the moment.
Still reproducible with app-portage/gentoolkit-9999 @ e4dda3e.
Hi, I've come from 8 years in the future to report that this is still an open issue :D
Created attachment 714375 [details] updated meta.py with an ugly fix for the issue Hi, An ugly fix for this is to update the meta.py (attached) if QUERY_OPTS["description"]: desc = best_match.metadata.descriptions() if not desc: sdesc = best_match.ebuild_path() file = open(sdesc, "r") for line in file: if re.search("DESCRIPTION", line): print(line.split("\"")[1]+"\n") file.close() return print_sequence(format_list(desc)) A proper one is probably creating a new class for ebuild reading and adding the same or enforcing\populating the metadata.xml description with the ebuild description value for all the packages
Fixed description output when metadata.xml did not have one. Falls back to the ebuild description. eg: brian@storm ~/Dev/git/gentoolkit $ equery m -d gentoopm * app-portage/gentoopm [gentoo] A common interface to Gentoo package managers brian@storm ~/Dev/git/gentoolkit $
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=cc0b45fde4d333bd62da9988bc35418cd383c9ee commit cc0b45fde4d333bd62da9988bc35418cd383c9ee Author: Brian Dolbec <dolsen@gentoo.org> AuthorDate: 2022-07-10 03:41:54 +0000 Commit: Brian Dolbec <dolsen@gentoo.org> CommitDate: 2022-07-10 03:44:38 +0000 equery meta: Fix missing description when not in metadata.xml Add description property to Package class. If no description in metadata.xml, get the description from the ebuild. Bug: https://bugs.gentoo.org/447538 Signed-off-by: Brian Dolbec <dolsen@gentoo.org> pym/gentoolkit/equery/meta.py | 2 ++ pym/gentoolkit/package.py | 9 +++++++++ 2 files changed, 11 insertions(+)