public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Patrick Lauer <patrick@gentoo.org>
To: chriswhite@gentoo.org
Cc: gentoo-dev@robin.gentoo.org, dev-portage@gentoo.org, portage@gentoo.org
Subject: [gentoo-dev] Re: For starters.. requirements of the portage API
Date: Sun, 06 Mar 2005 13:03:30 +0100	[thread overview]
Message-ID: <1110110610.31097.16.camel@localhost> (raw)
In-Reply-To: <1110086845.14682.8.camel@secures>

[-- Attachment #1: Type: text/plain, Size: 3464 bytes --]

On Sun, 2005-03-06 at 14:27 +0900, Chris White wrote:
> Ok, since it was asked of by jstubbs, time to get some stuff rolling as
> to API requirements.
Very good idea.
I'm looking at it especially from a "tinderbox" (automated building)
point of view

- generic get/set access to all config options
We need to be able to generate a pre-defined environment for building

- interface to the depgraph
For certain operations, including build parallelization, we need a local
copy of all dependency information. Also, repoman might be able to be a
wrapper for this interface?

- access to ebuild.sh functions, e.g. tell portage "unpack and patch
foobar-1.2 for me"

> 1) repository can be more than just a standard abiding set of files.
> Maybe a custom repository, or a relational database.
That's backend and independent of the "outside" API

> 2) access to an internal download library built into portage (not wget
> or some such).  This would not only allow us to do basic downloading,
> but also address new protocols that come later on.
Excellent idea. afaik this idea is being implemented as "transports"?

> 3) ability to access certain information regarding package environment
> (CFLAGS, USE, etc.), which when trying to get this information, has been
> stated as "unclean" in case the methods change later on (ie. pulling
> from /var/pkg/db/category/package/USE I was told was a bad idea for some
> reason).
Does that differ from my idea for a generic config interface?

>   If portage can do it cleanly internally, an api should be able
> to tap into that and give us something more solid to work with.  This
> should also help in getting rid of those pesky "Did my package get
> compiled with this use flag" requests.
> 
> 4) a searching API to look for certain packages.  This sort of goes hand
> in  hand with #1, as it gives the ability for someone to get mysql
> querying to acccess a mysql repository.
I'd like to keep those two things separated.
From a user p.o.v. the backend (flat files, db, pigeons) should be
transparent. I think searching based on atoms, descriptions etc. would
be best, the SQL interface might be documented separately ...

> 5) Better info on SRC_URI's, including total size, downloaded size,
> md5's, blah blah,etc etc.  Somewhat goes hand in hand with #4.
> 
> 6) An output api which would help in supporting gui displaying as well
> as ncurses or anything else where one chooses that they want to put
> stuff.  Also, I'd like for a localization support feature in here
> (localized strings basically).  This would help in portage localization.
erm ...
that's not what the API does.
The API only gives you access to portage internals. Your GUI gets
wrapped around that so that any GUI uses the same communication
primitives.

Basically all your GUI needs to do should be:
import portage
blah=portage #blah is an instance of portage
blah.init()  # initialize that instance

then work with that.


> That's all that's on my mind for now.  Please let me know if I need to
> be clearer with some of my ideas.  Please feel free to put your 2
> $country_coin_denomiation_value in to make this another meaningful
> discussion.
I think you should get the frontend and the backend separated.
My GUI doesn't care about your SQL backend. Your SQL backend doesn't
care about my OpenGL GUI. 
Otherwise I think your first rough draft looks good.

wkr,
Patrick

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2005-03-06 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-06  5:27 [gentoo-dev] For starters.. requirements of the portage API Chris White
2005-03-06 12:03 ` Patrick Lauer [this message]
     [not found] ` <422AEE8A.40601@telia.com>
2005-03-06 12:09   ` [gentoo-dev] " Patrick Lauer
2005-03-06 12:32     ` Jason Stubbs

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=1110110610.31097.16.camel@localhost \
    --to=patrick@gentoo.org \
    --cc=chriswhite@gentoo.org \
    --cc=dev-portage@gentoo.org \
    --cc=gentoo-dev@gentoo.org \
    --cc=gentoo-dev@robin.gentoo.org \
    --cc=portage@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