Gentoo Archives: gentoo-dev

From: Sven Vermeulen <swift@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] maybe it is time to put portage queries into a database.
Date: Wed, 25 Jun 2003 06:30:18
Message-Id: 20030625063017.GB1200@Daikan.pandora.be
In Reply to: Re: [gentoo-dev] maybe it is time to put portage queries into a database. by Tony Clark
1 On Wed, Jun 25, 2003 at 12:36:00AM +0200, Tony Clark wrote:
2 [... Portage with DB backend ...]
3 > Not that I am aware of. If there is let me know.
4
5 Yes, well, no... not really that I know of. Hmm, let me explain :)
6
7 We (a small research group) are currently investigating bringing Gentoo Linux
8 desktops to companies. One of the things we're investigating is having
9 Portage on a remote MySQL database _but_ still having a local Portage for
10 when the network goes down. This is indeed rather easy (it needs some patches
11 to portage.py so that it queries the server and not parses it's own cache or
12 ebuild collection) but our current implementation is faulty (well, it works
13 great, but it isn't flexible).
14
15 The next choice would be to have Portage enhanced with databasefunctionality
16 (using Python's DB-API) and support for remote databases. This way a local
17 Gentoo desktop (as most of the people have) would store it's information in
18 normal ebuilds (default behaviour), a local Berkeley DB (optional) or a
19 remote SQL-server (optional). This would mean that Portage be enhanced with a
20 medium-independent layer, and several sublayers (one for each medium) which
21 takes care of the medium-dependent stuff.
22
23 Alain was working on a similar layer-implementation, but has dropped it in
24 favor of another project.
25
26 Also, as you might now, this would be a major rewrite, so it's not the
27 current priority :) So if you want to fasten the search-functionality, write
28 a script that parses /usr/portage/*/*/*.ebuild and puts it in a database,
29 create a small script that does a SQL-statement against the database, and use
30 that script instead of "emerge -[sS]".
31
32 Wkr,
33 Sven Vermeulen
34
35 --
36 Thanks to DRM, you know that something has been built in environment of
37 unspecified degree of security, from source you cannot check, written by
38 programmers you don't know, released after passing QA of unknown quality and
39 which is released under a license that disclaims any responsibility...