Gentoo Archives: gentoo-portage-dev

From: Brian <dol-sen@×××××.net>
To: gentoo-portage-dev <gentoo-portage-dev@l.g.o>
Subject: Re: [gentoo-portage-dev] Portage API
Date: Wed, 20 Oct 2004 01:28:14
Message-Id: 1098235734.20744.28.camel@localhost
In Reply to: Re: [gentoo-portage-dev] Portage API by Daniel Taylor
1 On Tue, 2004-10-19 at 18:56 -0400, Daniel Taylor wrote:
2
3 > Everytime that Porthole does anything other than load package
4 > information, and external script (emerge) is run. This seems a bit
5 > inefficient, when we already have Portage loaded in memory as a module.
6 > What I think would be much more convenient and perhaps provide more
7 > functionality would be to emerge through the API;
8 > portage.emerge(app_name, pipe), where pipe would allow reading output
9 > and entering input (if a question needs to be answered or something).
10 > You should be able to internally streamline this process so that
11 > another instance of Portage doesn't need to be loaded. This principle
12 > applies to other functions, such as syncing, as well.
13 >
14
15 I don't know that much about threading, but currently porthole must be
16 run as root in order to call emerge to sync or install. That means
17 anything that porthole spawns runs as root, including browsers. I
18 believe that emerge should still be a spawned process so that porthole
19 can have the ability to run as a user with only the spawned processes
20 that require root priveliges can be run so. Unfortunately there is not
21 currently a python interface to libgksu & libgksuUI. I have thought
22 about using swig to generate one.
23
24 Any experienced volunteers???
25
26 That way porthole could also run with a different portage for the gui
27 than the target system such as a chroot install/maintainance (I think).
28
29
30 > This isn't part of the API, but I thought I'd mention it. Portage is
31 > notorious for not being internationalized. I did a mockup of a gconf-
32 > and GNOME-using, il8n-ized, HIGified, multi-backend Porthole just a few
33 > weeks back. I think Brian is adding il8n to the current codebase. Even
34 > if we were to support il8n, package descriptions and various output
35 > would all only be available in English. This needs to change.
36 >
37
38 I currently only have all text strings marked for gettext support. I
39 need to study up on what else needs to be done. I have one volunteer
40 for vietnamese translation. I am sure others will volunteer once
41 support is complete.
42
43
44 I agree with Dan that better dependancy connections are needed.
45 Porthole does not I believe always agree with what an emerge -p comes up
46 with. But it is now much better than it used to be.
47
48 --
49 Brian <dol-sen@×××××.net>
50
51
52 --
53 gentoo-portage-dev@g.o mailing list