public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian <dol-sen@telus.net>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] Portage API
Date: Mon, 18 Oct 2004 18:08:52 -0700	[thread overview]
Message-ID: <1098148132.27883.87.camel@localhost> (raw)
In-Reply-To: <200410182253.44450.jstubbs@gentoo.org>

Here is the portion of Fredriks reply on the porthole-dev list for those
that are not on that list.

Hi,

Yes, I confess. I wrote most of portagelib.py. I am a little rusty
though, since I haven't been involved in porthole development for quite
som time.

mån 2004-10-18 klockan 22.14 skrev Brian:
> On Mon, 2004-10-18 at 22:53 +0900, Jason Stubbs wrote:
> > The current USE settings. I'm don't see why PORTDIR or
PORTDIR_OVERLAY is 
> > needed.
> 
> Porthole searches the directories for ebuilds, etc..  Better to use
the
> correct directories, so get the correct directories.  I believe Dan
was
> using portage rather than creating new code to scan
thru /etc/make.conf
> as well as the globals & defaults.

Yep, except it was I who did it :-)
 
> > > portage.auxdbkeys
> > 
> > I'm not sure what's required here either.

auxdbkeys is/should be a list of all properties an ebuild can have. It
was used to get all properties at once. The point of this was, if I
recall correctly, to convert the properties into fields in a python
object. Not necessary, but high in hack value, I think :-)

> > > # showing complete porthole function for (possibly) more clarity
> > > def get_properties(ebuild):
> > >     """Get all ebuild variables in one chunk."""
> > >     return Properties(dict(zip(keys,
> > >                                portage.portdb.aux_get(ebuild,
> > >
portage.auxdbkeys))))
> > >
> > >

See previous point.

> 
> To use portage's vercmp() I would have to write a python bubble sort
to
> sort a list of ebuild versions.   What I did was use Marius's code and
> modified it to pad the version string parts to 3 digits then used
> python's builtin list.sort().
> 

Ah, but list.sort() takes an option argument, which is a comparison
function. I haven't looked at it, but I would guess vercmp() is designed
to work with list.sort(). No need to write that bubble sort.

-- 
Fredrik Arnerup <e97_far@e.kth.se>
http://www.stacken.kth.se/~foo/

-- 
Brian <dol-sen@telus.net>


--
gentoo-portage-dev@gentoo.org mailing list


  parent reply	other threads:[~2004-10-19  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 11:01 [gentoo-portage-dev] Portage API Jason Stubbs
2004-10-17 16:25 ` Brian
2004-10-18 13:53   ` Jason Stubbs
2004-10-18 16:14     ` Brian
2004-10-19  1:08     ` Brian [this message]
2004-10-23 14:29       ` Jason Stubbs
2004-10-18 18:52   ` Daniel Taylor
2004-10-19 22:56     ` Daniel Taylor
2004-10-20  1:28       ` Brian
2004-10-18 20:08 ` Brian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1098148132.27883.87.camel@localhost \
    --to=dol-sen@telus.net \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox