From: Ciaran McCreesh <ciaranm@ciaranm.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [soc] Python bindings for Paludis
Date: Sat, 24 Mar 2007 20:59:41 +0000 [thread overview]
Message-ID: <20070324205941.5adeb3f5@snowflake> (raw)
In-Reply-To: <46057B39.6070902@gentoo.org>
On Sat, 24 Mar 2007 20:25:45 +0100
Luca Barbato <lu_zero@gentoo.org> wrote:
> Ciaran McCreesh wrote:
> > Assuming you mean piotr, who is not pioto... The difference is,
> > piotr's proposal is possible and doable within the timeframe,
> > whereas lu_zero's sounds nice if you don't know anything about any
> > of the package managers in question and can't be delivered within
> > three months.
>
> I'd like to know your opinion about which are the pitfalls and the
> issues since you are surely more informed than me on paludis and, to a
> large degree, on portage internals.
>
> I assumed that for a foundation and a non exaustive converage the
> summer would be more than enough.
If you're wanting to do a very simple API supporting approximately the
following, you're ok:
* Fetching a list of package versions that match a particular
dependency atom
* Fetching a list of available packages
* Simple metadata queries upon a particular package
* Fetching the contents of a particular package
If you're wanting to make a powerful API that lets people solve real
world problems, you're in for an awful lot of trouble.
The problem is this... Although Paludis, Pkgcore and Portage solve the
same ultimate problem, they do it in extremely different ways.
Internally and from a public API perspective, there's very little in
common between the three.
Portage is by and large procedural and messy. It's basically an
incoherent bunch of routines to do particular things. It doesn't
generalise well, and things you'd expect to be similar aren't (e.g.
you'd think finding out something about a package in VDB would be
the same as finding out something about a package in the tree, but
that would be far too easy...).
Paludis is basically what you'd expect from a highly OO, resource
managed language like C++. The problem is, a generalised API would end
up hiding nearly all of the flexibility and functionality.
You also can't wrap Paludis in any programming language that doesn't do
resource management of some kind (preferably fully controlled, but
since only C++ offers that, garbage collected works too). Writing a
common middle layer in C and then writing language extensions on top of
that isn't doable -- the common middle layer would have to be C++,
since you can't write Ruby extensions in Python or suchlike...
Pkgcore is closer to being AO than OO, largely because of programming
language differences. Again, a generalised API would mask flexibility
and functionality. You'd have a hard time getting callbacks to
generalise cleanly.
Design issues aside, there're also problems conceptually. The three
package managers have very different ideas of certain key concepts like
repositories, packages, the general operating environment (or domain)
and version metadata. You'd have to come up with a whole new conceptual
model that can handle all three paradigms, and you'd have to do it in
such a way that you don't kill the performance techniques (delayed and
batch loading, effectively) used by Paludis and Pkgcore.
So it's down to a question of scope. Are you trying to make an API to
do a few very basic queries, or are you trying to make an API powerful
enough to, say, make a graphical front end? The former is doable and
useless, the latter is a massive project.
Now, what you *could* do is implement a portageq-style tool with more
functionality. You'd still have conceptual issues (Paludis doesn't
particularly like giving you global configuration information, for
example -- simple things like querying whether a USE flag is enabled
need an associated c/p-v::r), but they wouldn't be as bad. Such a tool
would be slow, of limited use and easily doable within the available
time.
> I'm more interested in a solid base than a complete and exaustive
> wrapper =)
Which is the problem... The base is extremely different for all three.
--
Ciaran McCreesh
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2007-03-24 21:02 UTC|newest]
Thread overview: 131+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 23:28 [gentoo-dev] [soc] Python bindings for Paludis Piotr Jaroszyński
2007-03-24 2:21 ` Josh Saddler
2007-03-24 2:46 ` Jonathan Adamczewski
2007-03-24 7:28 ` Wernfried Haas
2007-03-24 8:31 ` Alec Warner
2007-03-24 9:06 ` Wernfried Haas
2007-03-24 5:50 ` Mike Frysinger
2007-03-24 12:54 ` Michael Cummings
2007-03-24 13:30 ` Piotr Jaroszyński
2007-03-24 15:58 ` [gentoo-dev] YA_non-technical post about development (was Re: [soc] Python bindings for Paludis) Steve Long
2007-03-24 16:06 ` [gentoo-dev] [soc] Python bindings for Paludis Grant Goodyear
2007-03-24 16:33 ` Grant Goodyear
[not found] ` <4605523F.8070002@gentoo.org>
2007-03-24 16:38 ` Ciaran McCreesh
2007-03-24 16:51 ` Grant Goodyear
2007-03-24 20:08 ` Robert Buchholz
2007-03-24 19:25 ` Luca Barbato
2007-03-24 19:52 ` Alec Warner
2007-03-24 20:59 ` Ciaran McCreesh [this message]
2007-03-24 23:00 ` Luca Barbato
2007-03-24 16:46 ` Piotr Jaroszyński
2007-03-24 16:48 ` Mike Kelly
2007-03-24 17:10 ` Mike Doty
2007-03-24 12:02 ` Anant Narayanan
2007-03-24 17:19 ` Matthias Langer
2007-03-25 14:40 ` Mike Frysinger
2007-03-25 14:46 ` Ciaran McCreesh
2007-03-25 14:58 ` Mike Frysinger
2007-03-25 15:34 ` Piotr Jaroszyński
2007-03-25 15:54 ` Andrew Gaffney
2007-03-25 17:05 ` Piotr Jaroszyński
2007-03-25 18:03 ` Mike Frysinger
2007-03-25 18:28 ` Michael Krelin
2007-03-27 19:19 ` Mike Frysinger
2007-03-27 20:15 ` Ciaran McCreesh
2007-03-28 13:08 ` Paul de Vrieze
2007-03-28 19:49 ` Anant Narayanan
2007-03-29 8:56 ` Ciaran McCreesh
2007-03-29 17:16 ` Anant Narayanan
2007-03-29 17:50 ` Ciaran McCreesh
2007-03-29 20:47 ` Thomas Rösner
2007-03-29 21:04 ` Ciaran McCreesh
2007-03-30 7:49 ` Thomas Rösner
2007-03-30 12:51 ` Ciaran McCreesh
2007-03-29 21:37 ` Anant Narayanan
2007-03-30 0:58 ` Seemant Kulleen
2007-03-30 2:55 ` Anant Narayanan
2007-03-30 3:22 ` Seemant Kulleen
2007-03-30 4:40 ` Anant Narayanan
2007-03-30 6:22 ` Vlastimil Babka
2007-03-30 3:14 ` Alec Warner
2007-03-30 12:55 ` Ciaran McCreesh
2007-03-30 15:07 ` Andrej Kacian
2007-03-30 20:13 ` Roy Marples
2007-03-30 20:23 ` Ciaran McCreesh
2007-03-30 21:13 ` Christopher Sawtell
2007-03-30 21:22 ` Ciaran McCreesh
2007-03-31 2:24 ` Seemant Kulleen
2007-03-30 21:41 ` Danny van Dyk
2007-03-31 2:26 ` Seemant Kulleen
2007-03-31 2:53 ` Christopher Sawtell
2007-03-31 3:31 ` Seemant Kulleen
2007-03-31 22:39 ` [gentoo-dev] " Steve Long
2007-03-31 22:51 ` Seemant Kulleen
2007-04-01 1:09 ` Christopher Sawtell
2007-04-02 9:36 ` [gentoo-dev] " Steve Long
2007-03-31 2:02 ` [gentoo-dev] " Roy Marples
2007-03-29 18:57 ` Ned Ludd
2007-03-29 19:06 ` Ciaran McCreesh
2007-03-29 19:25 ` Ned Ludd
2007-03-29 20:02 ` Ciaran McCreesh
2007-03-29 20:33 ` Ned Ludd
2007-03-29 21:00 ` Stephen Bennett
2007-03-29 21:03 ` Ilya A. Volynets-Evenbakh
2007-03-29 21:41 ` Ned Ludd
2007-03-30 9:07 ` Brian Harring
2007-03-30 13:18 ` Ciaran McCreesh
2007-03-30 18:04 ` Mike Frysinger
2007-03-30 18:35 ` Ciaran McCreesh
2007-03-30 18:50 ` Homer Parker
2007-03-30 18:56 ` Ciaran McCreesh
2007-03-30 20:41 ` Michael Krelin
2007-03-30 20:47 ` Ciaran McCreesh
2007-03-30 21:53 ` Michael Krelin
2007-03-31 22:45 ` [gentoo-dev] " Steve Long
2007-03-31 23:16 ` Michael Krelin
2007-03-30 20:30 ` [gentoo-dev] " Larry Lines
2007-03-30 20:37 ` Ciaran McCreesh
2007-03-30 20:51 ` Mike Frysinger
2007-03-30 21:09 ` Ciaran McCreesh
2007-03-31 0:29 ` Mike Frysinger
2007-03-31 0:45 ` Ciaran McCreesh
2007-03-31 1:03 ` Mike Frysinger
2007-03-31 1:07 ` Ciaran McCreesh
2007-03-30 23:09 ` Anant Narayanan
2007-03-30 23:15 ` Josh Saddler
2007-03-31 0:33 ` Mike Frysinger
2007-03-30 18:42 ` Matthias Langer
2007-03-30 19:28 ` Seemant Kulleen
2007-03-30 20:54 ` Mike Frysinger
2007-03-31 5:36 ` Rumen Yotov
2007-03-31 6:12 ` [gentoo-dev] " Duncan
2007-04-01 11:20 ` Adam Pickett
2007-04-01 13:13 ` Mike Auty
2007-04-01 19:11 ` Duncan
2007-04-01 22:43 ` Mike Auty
2007-04-02 9:15 ` Duncan
2007-03-31 18:02 ` [gentoo-dev] " Christopher Covington
2007-03-31 18:16 ` Andrej Kacian
2007-03-31 19:24 ` Seemant Kulleen
2007-03-31 19:34 ` Andrej Kacian
2007-03-31 19:39 ` Stephen Bennett
2007-03-31 22:27 ` [gentoo-dev] " Steve Long
2007-03-31 22:39 ` Ciaran McCreesh
2007-03-31 22:53 ` Mike Frysinger
2007-03-31 22:37 ` [gentoo-dev] " Alec Warner
2007-04-03 13:55 ` Mike Kelly
2007-04-03 17:10 ` antarus
2007-04-05 8:22 ` Ciaran McCreesh
2007-04-01 0:31 ` Jan Kundrát
2007-03-31 22:30 ` Mike Frysinger
2007-03-27 20:17 ` Michael Krelin
2007-03-25 16:23 ` [gentoo-dev] " Duncan
2007-03-25 18:35 ` Steve Long
2007-03-25 23:41 ` Alec Warner
2007-03-24 19:50 ` [gentoo-dev] " Daniel Drake
2007-03-24 21:18 ` Denis Dupeyron
2007-03-24 7:09 ` Luca Barbato
2007-03-24 16:24 ` Ciaran McCreesh
2007-03-24 19:53 ` Luca Barbato
2007-03-24 20:28 ` Danny van Dyk
2007-03-24 20:49 ` Luca Barbato
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=20070324205941.5adeb3f5@snowflake \
--to=ciaranm@ciaranm.org \
--cc=gentoo-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