Bastian Balthazar Bux wrote:
The easiest way I can think of is using AUX_GET.py. I can't remember if it came with portage, or if genone gave it to me. Anyway, here it is. Now if you want something out of ebuilds just do aux_get.py DEPEND PACKAGE and it will go into the Database and fetch it.
spoken too fast as always, unclepine check dependancies of installed packages, I need a way to grep the portage tree DEPEND variables.
Exist a bash way to search a value (read package) inside
DEPEND/RDEPEND variables defined in the ebuilds.
If not which is the easyer way ?
I'm not sure to understand what are you looking for, but maybe unclepine is the tool for you:
http://forums.gentoo.org/viewtopic.php?t=249828
Ciao
Francesco
one shot one kill, it's exactly what I was searching for. Ciao Francesco
anyway it's an interesting tool, saved for later use ;)
I was thinking to something like:
find /usr/portage -name "*.ebuild" -exec grep -ls "\sDEPEND=.*dev-db/mysql" {} \;
but DEPEND variable span across multiple lines, and I don't know how to parse it :(
The down side is it used the portage database instead of the ebuilds themselves, so it's kinda slow ;)
-- [email protected] mailing list
-- Alec Warner Spartasoft Secretary ( spartasoft.msu.edu ) Junior Computer Science Michigan State University [EMAIL PROTECTED]
#!/usr/bin/python
import sys sys.path.insert(0, "/usr/lib/portage/pym") import portage if len(sys.argv) != 3: print "need exactly two arguments: key and value" sys.exit(1) # make a few assumptions for now db = portage.db["/"]["porttree"].dbapi key = sys.argv[1] value = sys.argv[2] for p in db.cp_all(): for pv in db.cp_list(p): if value in db.aux_get(pv, [key])[0].split(): print pv
-- [email protected] mailing list
