On 05/11/16 01:20, Rich Freeman wrote: > On Fri, Nov 4, 2016 at 8:30 PM, M. J. Everitt <m.j.ever...@iee.org> wrote: >> Apologies, getting ahead of myself here .. there must be a portage >> utility, but I've forgotten which one interrogates metadata .. I'll >> defer to a more authoritative source ... >> > There might be a command line utility if you're doing things the shell way. > > But, from that python script I linked the relevant part is: > > from portage.xml.metadata import MetaDataXML > > metxml = path+"/"+category+"/"+pkgname+"/metadata.xml" > maints=[] > try: > pkg_md = MetaDataXML(metxml,"/usr/portage/metadata/herds.xml") > for maint in pkg_md.maintainers(): > maints.append(maint.email) > except IOError: pass > > Just feed that api call with a metadata.xml. Hopefuly it works with > the projects.xml syntax as herds.xml is of course defunct. I'd > check the portage API docs as there might be some improvements there. > > The portage api is actually fairly powerful and far superior to a lot > of stuff that gets done with grep. It just needs a bit of time > getting used to it since there aren't a lot of docs/examples/etc > floating around. The script that came out of was designed to find > packages that depend on packages that expose subslots but which don't > define slot operator deps. Granted, not everything in that list > should be using them, and by now I imagine it is almost entirely false > positives, but it shows the sort of thing you can do with a couple of > lines of python that would be an incredible pain to do any other way. > I believe paludis also exposes some APIs that probably could also be > used. > Bit beyond my python-fu .. but I get where you're going with that. If I wasn't banging my head against cups/hplip, I might give it a shot ... :P !!
signature.asc
Description: OpenPGP digital signature