Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272492 - app-portage/gentoolkit equery meta should print the herd's email next to the herd name
Summary: app-portage/gentoolkit equery meta should print the herd's email next to the ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 237964
  Show dependency tree
 
Reported: 2009-06-03 20:26 UTC by Sebastian Luther (few)
Modified: 2009-06-19 17:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Make equery meta print out the herd's email next to the herd name (gentoolkit-equery-meta-herd-email.patch,2.96 KB, patch)
2009-06-03 20:27 UTC, Sebastian Luther (few)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Luther (few) 2009-06-03 20:26:27 UTC
Most herd emails are <herd-name>@g.o, but some aren't. This can be quite annoying for bug-wrangling. The attached patch makes equery m <pkg> print out the emails.

currently: 

$ equery m postgresql-server
 * dev-db/postgresql-server
Herd:        postgresql
Maintainer:  None specified
Upstream:    None specified

with the patch:

$ equery m postgresql-server
 * dev-db/postgresql-server
Herd:        postgresql (pgsql-bugs@gentoo.org)
Maintainer:  None specified
Upstream:    None specified
Comment 1 Sebastian Luther (few) 2009-06-03 20:27:46 UTC
Created attachment 193446 [details, diff]
Make equery meta print out the herd's email next to the herd name

Patch is written against djanderson's private svn repo, rev 4.
Comment 2 Douglas Anderson 2009-06-03 23:02:30 UTC
Thanks! I'll take a look at this later tonight.
Comment 3 Douglas Anderson 2009-06-04 04:24:03 UTC
Great idea. I took your patch and just simplified it a bit, and added the ability to turn off the email output when you pass --quiet to equery or when piping.

You can see the results in HEAD of http://genscripts.googlecode.com/svn
Thanks!
Comment 4 Sebastian Luther (few) 2009-06-04 05:06:10 UTC
	for node in herds_tree.getiterator("herd"):
		for subnode in node.getiterator("name"):
			if subnode.text == herd:
				for emailsubnode in node.getiterator("email"):
					return emailsubnode.text

This is the way I wrote it first, but the problem is, that it relies on the presence of the email node (which is optional, see [1]). If there is no email given but a maintainer, this is going to print the maintainers email address.

[1] http://www.gentoo.org/proj/en/metastructure/herds/#doc_chap5
Comment 5 Douglas Anderson 2009-06-04 05:35:01 UTC
(In reply to comment #4)
>         for node in herds_tree.getiterator("herd"):
>                 for subnode in node.getiterator("name"):
>                         if subnode.text == herd:
>                                 for emailsubnode in node.getiterator("email"):
>                                         return emailsubnode.text
> 
> This is the way I wrote it first, but the problem is, that it relies on the
> presence of the email node (which is optional, see [1]). If there is no email
> given but a maintainer, this is going to print the maintainers email address.
> 
> [1] http://www.gentoo.org/proj/en/metastructure/herds/#doc_chap5
> 

Yeah, you're right. I just have a problem with so many levels indents... makes me crazy. :)

I'll try to think of a way to split the indents down, maybe w/ a break or continue statement so that it works right and is readable, too.

Glad someone's paying attention ;)
Comment 6 Douglas Anderson 2009-06-04 05:51:09 UTC
	for node in herds_tree.getiterator("herd"):
		if node.findtext("name") == herd:
			return node.findtext("email")

That seems to work and is a lot simpler. Let me know if you think I missed something.
Comment 7 Sebastian Luther (few) 2009-06-04 06:42:15 UTC
(In reply to comment #6)
>         for node in herds_tree.getiterator("herd"):
>                 if node.findtext("name") == herd:
>                         return node.findtext("email")
> 
> That seems to work and is a lot simpler. Let me know if you think I missed
> something.
> 

Looks good.
Comment 8 Douglas Anderson 2009-06-05 04:17:53 UTC
r661 | fuzzyray | 2009-06-04 19:28:51 -0400 (Thu, 04 Jun 2009) | 1 line

Update with rev 9 from the genscripts repo
Comment 9 Paul Varner (RETIRED) gentoo-dev 2009-06-19 17:13:50 UTC
Released in gentoolkit-0.3.0_rc7