Gentoo Archives: gentoo-dev

From: Stuart Herbert <stuart@g.o>
To: Ryan Phillips <rphillips@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Interaction in ebuilds - bad idea?
Date: Fri, 30 Apr 2004 21:26:43
Message-Id: 200404302239.55447.stuart@gentoo.org
In Reply to: [gentoo-dev] Re: Interaction in ebuilds - bad idea? by Ryan Phillips
1 On Friday 30 April 2004 22:06, Ryan Phillips wrote:
2 > I think this is a really good idea. The ebuild config mechanism is
3 > not all that smart.
4
5 Let's try and make it smarter.
6
7 For example, if we absolutely *have* to ask the user for some information for
8 an ebuild - if there's no way to script it (and I think there is) - let's
9 make Portage ask all the questions *before* downloading and compiling
10 anything. It makes sense to ask all the questions up-front, so that the user
11 doesn't constantly have to check his 'emerge -u world' to see if it has
12 stopped to ask a question.
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 We could even provide a tool to edit the cache - and hey presto - without that
31 much effort we've just made ebuilds a lot smarter, and Gentoo an even better
32 platform.
33
34 > Since, there is work on an installer there should
35 > be some mechanism for the installer to query an "install specification
36 > file" per package.
37
38 Isn't the installer's role to perform that initial install onto virgin
39 hardware? Will the installer really play a role in the day to day
40 maintenance of a Gentoo box?
41
42 > Something like an installshield script,
43
44 urgh, please no ;-)
45
46 Besides, we already have something like that - the ebuilds themselves.
47
48 > but it
49 > needs to export configuration items (ie: parameters, possible values,
50 > etc). The interface should be generic enough so that any type of
51 > configuration utility (GUI, console, or non-interactive) can run the
52 > configuration.
53
54 dialog and xdialog would be a good starting point. Although personally I'd
55 throw dialog out of the window, and use lxdialog from the kernel instead ;-)
56
57 > Depending on the time frame... I may be able to help out on this.
58 > Graduation from college is at the end of this year (I hope :).
59
60 If the Portage team could add the pkg_askuser() and the cache, then any ebuild
61 maintainer could start taking advantage very quickly. Anyone from the
62 Portage team care to comment on this idea?
63
64 Best regards,
65 Stu
66 --
67 Stuart Herbert stuart@g.o
68 Gentoo Developer http://www.gentoo.org/
69 Missed the php|cruise? http://dev.gentoo.org/~stuart/cruise-2004/
70
71 GnuPG key id# F9AFC57C available from http://pgp.mit.edu
72 Key fingerprint = 31FB 50D4 1F88 E227 F319 C549 0C2F 80BA F9AF C57C
73 --

Replies

Subject Author
Re: [gentoo-dev] Re: Interaction in ebuilds - bad idea? Marius Mauch <genone@g.o>
Re: [gentoo-dev] Re: Interaction in ebuilds - bad idea? Chris Gianelloni <wolf31o2@g.o>