On Sun, 2011-05-29 at 17:48 +0200, Andrea Arteaga wrote:
> Dear Brian
> Thank you for your email. Good to know that somebody is actively
> working on this!
> Actually what I need is the ability for the user (not root) to create
> binary packages somewhere he can write (PKGDIR=somedir emerge -B
> somepkg). It would also be useful to also retrieve the installable
> packages matching a given pattern (e.g. eigen or dev-cpp/eigen or
> >=dev-cpp/eigen-3.0.0).
> 
> I'm starting my project using the command-line interface to emerge and
> equery. 

The Dependencies.graph_depends()  fix for the api return value is in the
-0.3.0.4 release.  You should use the gentoolkit python api's instead of
parsing terminal output for equery calls.  It is faster and more
dependable than parsing terminal output which has a habit of changing.

> When I feel your public_api are ready anough for my usege, I
> will switch to it, which won't be a big deal (I hope).
> --
> Cheers
> Andrea Arteaga
> 

No problem.  I'll let you know when it is ready.

> 
> 2011/5/23 Brian Dolbec <brian.dolbec@gmail.com>:
> > Andrea, use the public_api branch of the portage git repo as much as
> > possible.  If there is additional functionality you need, then ask.  I
> > will gladly try to get it for you if possible.  I am just now adding
> > emerge capability to the api, so you should be able to use it later in
> > the project for emerging.  I would however set up your code to be able
> > to run emerge from a subprocess.  You should find the most common
> > information gathering functions in the api now.  They should be fairly
> > straightforward to use.  Keep in mind that the api is likely to change
> > somewhat yet as it is used more and improved.
> >
> > start by creating a portage.api.settings.PortageSettings instance
> >
> > Hopefully it will be merged into regular portage releases by the end of
> > this years gsoc.
> >
> > As for custom CFLAGS and other
> > variables, /etc/portage/env/$CAT/$pkg/files are used for individual pkg
> > overrides.  As I've never used them I can't give you more detail about
> > it or where to look.
> >
> > If you need to write to those files, I would like to establish some code
> > in the api to standardize it and make it available for use.  In the
> > meantime you can look if the one I use in porthole is suitable.  I run
> > it as root from a terminal call or import it and use it directly the
> > importing code has the right privileges.
> >
> > http://porthole.git.sourceforge.net/git/gitweb.cgi?p=porthole/porthole;a=blob;f=porthole/backends/set_config.py;h=8e78126377f8fc79fc51f9d17499df48a2e0270e;hb=HEAD
> >
> > And if you need to keep an internal db of all those:
> >
> > http://porthole.git.sourceforge.net/git/gitweb.cgi?p=porthole/porthole;a=blob;f=porthole/db/user_configs.py;h=7f1c61459f26c6856f80d02cbdfb81ac3c04d7e2;hb=HEAD
> >
> > --
> > Brian Dolbec <brian.dolbec@gmail.com>
> >
> 


-- 
Brian Dolbec <brian.dolbec@gmail.com>