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
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.
Thanks! I'll take a look at this later tonight.
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!
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
(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 ;)
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.
(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.
r661 | fuzzyray | 2009-06-04 19:28:51 -0400 (Thu, 04 Jun 2009) | 1 line Update with rev 9 from the genscripts repo
Released in gentoolkit-0.3.0_rc7