Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: stuart@g.o
Cc: Ryan Phillips <rphillips@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Interaction in ebuilds - bad idea?
Date: Sat, 01 May 2004 18:44:32
Message-Id: 1083435999.9393.45.camel@localhost
In Reply to: Re: [gentoo-dev] Re: Interaction in ebuilds - bad idea? by Stuart Herbert
1 On Fri, 2004-04-30 at 17:39, Stuart Herbert wrote:
2 > For example, if we absolutely *have* to ask the user for some information for
3 > an ebuild - if there's no way to script it (and I think there is) - let's
4 > make Portage ask all the questions *before* downloading and compiling
5 > anything. It makes sense to ask all the questions up-front, so that the user
6 > doesn't constantly have to check his 'emerge -u world' to see if it has
7 > stopped to ask a question.
8
9 This would be perfect for ebuilds which we are required to ask the user
10 to explicitly accept the license. This mechanism would be able to fit
11 both the needs for interactivity and the needs of the ACCEPT_LICENSE
12 variable.
13
14 > Imagine running, for an example, 'emerge -u world'. Once Portage has
15 > calculated the dependencies, it could call a function (let's call it
16 > pkg_askuser) in each ebuild to gather further information. pkg_askuser would
17 > need some library functions to call, so that we can standardise the user's
18 > experience. Portage would have to cache the information gathered by
19 > pkg_askuser, and then it could continue with running each ebuild in turn
20 > exactly as it currently does. Each ebuild would have access to the cache
21 > (how doesn't matter yet), so that it can use the right database server, the
22 > right user and password, or whatever that information needs to be.
23 >
24 > The cache itself can be reused in future - so that the user doesn't have to
25 > type in the same information the next time he does an 'emerge -u world'. We
26 > could store the cache inside the profile, for example. Just as we have a
27 > use.desc file to explain what each USE flag does, we could add a cache.desc
28 > file to explain what each value in the cache is for.
29
30 I like it. I can already think of one usable variable, ACCEPT_LICENCE,
31 which is used by the games team (anyone else?) to force a user to accept
32 a license. Currently, this breaks the non-interactivity of portage,
33 since there is not any code in portage itself for handling this.
34
35 > We could even provide a tool to edit the cache - and hey presto - without that
36 > much effort we've just made ebuilds a lot smarter, and Gentoo an even better
37 > platform.
38
39 > If the Portage team could add the pkg_askuser() and the cache, then any ebuild
40 > maintainer could start taking advantage very quickly. Anyone from the
41 > Portage team care to comment on this idea?
42
43 I think this is a great idea. I also think that the portage devs are
44 pretty busy, so let's all hope that they can get some much-needed help
45 to get this implemented.
46
47 --
48 Chris Gianelloni
49 Developer, Gentoo Linux
50 Games Team
51
52 Is your power animal a penguin?

Attachments

File name MIME type
signature.asc application/pgp-signature