1 |
Felipe Contreras wrote: |
2 |
|
3 |
> On Sat, Feb 23, 2008 at 10:45 PM, Alec Warner <antarus@g.o> wrote: |
4 |
>> On 2/20/08, Felipe Contreras <felipe.contreras@×××××.com> wrote: |
5 |
>> > b) Error are difficult to handle since bash doesn't have exceptions |
6 |
>> |
7 |
>> I disagree here: most errors are fatal anyway any non fatal errors can |
8 |
>> be printed and saved via the elog facility. |
9 |
> |
10 |
> Yes, for the most common usage that's true, but that think about this |
11 |
> example: I'm compiling gstreamer-plugins-good, which needs libraw1394, |
12 |
> but the compilation fails, perhaps that user is not interested in that |
13 |
> particular plugin so a dialog can pop up and the user can choose if to |
14 |
> continue without the libraw stuff or fail. |
15 |
> |
16 |
That would typically be configured via USE flags, or for some things via a |
17 |
USE expand, like CAMERAS for gphoto. I agree there is scope for UI work, |
18 |
but I think that's better done by other apps calling the package manager, |
19 |
in the same way as other distros do. For Gentoo, we use update from the |
20 |
CLI, and himerge for a GUI, although portato (GTK) and kuroo (KDE) are both |
21 |
nice too. Typically in such an instance a user would see the package fail, |
22 |
and try with a different USE setting. |
23 |
|
24 |
We're adding USE editing to update, should be done this week; for all the |
25 |
GUIs that's already possible. In terms of what you're discussing, the |
26 |
package manager has to be able to run without user interaction, but a next |
27 |
generation build system is possible (eg pbuilds in python have been |
28 |
discussed on IRC, and qmake et al are around); ebuild is more a meta-format |
29 |
in that it can use a wide variety of base tools. |
30 |
|
31 |
update: http://forums.gentoo.org/viewtopic-t-546828.html |
32 |
http://www.haskell.org/himerge/ |
33 |
http://portato.origo.ethz.ch/ |
34 |
http://kuroo.org/ |
35 |
> I'm sure that can be done without exceptions but as the complexity |
36 |
> increases properly checking/passing around error values/messages |
37 |
> becomes tedious. |
38 |
> |
39 |
>> > c) Persistent information is difficult to achieve (no database stuff) |
40 |
>> |
41 |
>> How is this a bash limitation? Most languages don't have 'database |
42 |
>> stuff' built in. |
43 |
>> I don't see how saving stuff to files is much different than the env |
44 |
>> dumping we do in bash? |
45 |
> |
46 |
> I guess it's mostly the burden of serializing/parsing all that stuff. |
47 |
> |
48 |
Saving to flat files or databases gives the same persistence, and in any |
49 |
case the ebuilds don't mess around with them, the package manager does. |
50 |
It's perfectly possible to use a database to store the information ofc, but |
51 |
at some point you have to deal with the fact that ebuilds are text files |
52 |
edited by humans. |
53 |
|
54 |
>> > A more featured language could allow for example: filtered output, |
55 |
>> > exception handling->state storage->resuming. |
56 |
>> > |
57 |
Portage does all those at the moment (filtering output can easily be done by |
58 |
script, see update, or in an app like kuroo.) |
59 |
|
60 |
>> > But the big deal is with the package definition, recently I learned |
61 |
>> > about Domain Specific Languages, and I think that is the best option. |
62 |
>> > |
63 |
>> > A new dsl allows many interesting features in the package definition |
64 |
>> > itself like: inheritance, exceptions, arrays, hash tables, objects, |
65 |
>> > modules, documentation, information messages, etc. |
66 |
>> |
67 |
>> Note that most languages allow for the same things...so why would we |
68 |
>> author our own language? What runtime would it use? |
69 |
> |
70 |
> The language can be something very simple that has bash embedded. That |
71 |
> has the advantage that you can just copy paste what you are doing |
72 |
> already. |
73 |
> |
74 |
If it's got bash embedded it won't be simple ;) I see ebuilds as already |
75 |
providing that DSL, in that you have full BASH capability and a library of |
76 |
API functions you can use. |
77 |
|
78 |
>> > I've tried different build systems: rpm, dpkg, autopackage. |
79 |
>> > Unfortunately I never tried ebuild because it was based on bash as |
80 |
>> > far as I could tell. |
81 |
>> |
82 |
>> Typically a 'build system' would refer to 'autotools' or 'ant' or |
83 |
>> 'setuptools' not an ebuild. |
84 |
> |
85 |
> Is there such a big difference? |
86 |
> |
87 |
> I'm sure it's possible to by-pass autotools and write down all the |
88 |
> commands required to build something in an ebuild. Similarly it's |
89 |
> possible to use autotools to compile and install a bunch of packages. |
90 |
> |
91 |
You seem to be missing that ebuild is a support metastructure on top of |
92 |
build systems like make, autotools or distutils? |
93 |
|
94 |
> Those "build systems" also need to be updated, but that's another story. |
95 |
> |
96 |
What for? |
97 |
|
98 |
>> > After almost a decade of using Linux I still haven't found a build |
99 |
>> > system that suits all my needs. AFAIK ebuild is the most advanced but |
100 |
>> > it's still relying on ancient technology (bash scripts) so there will |
101 |
>> > always be limitations despite the brilliant ideas. |
102 |
>> |
103 |
>> Bash is not 'ancient' and it works suprisingly well for the vast |
104 |
>> majority of cases. I realize using a high level language would |
105 |
>> probably make some tasks easier (mmm dicts and real arrays). There is |
106 |
>> the matter of porting over 10000 ebuilds however ;) |
107 |
> |
108 |
> Yeah, bash is pretty good for many things, just doesn't scale that much. |
109 |
> |
110 |
I'm not sure where and how it needs to scale. The API provided is very easy |
111 |
to work with and encompasses an amazing range of build systems. |
112 |
|
113 |
> At some point someone decided the current status was not good enough |
114 |
> and decided to create ebuild, even though he was well aware that |
115 |
> thousands of already existing instructions about how to build packages |
116 |
> would have to be re-written. |
117 |
> |
118 |
Not at all; ebuild utilises those instructions (eg makefiles). It just makes |
119 |
every build system available and provides an extended BASH API for common |
120 |
tasks. |
121 |
|
122 |
> If it's easy to write people will possibly even write more of those. |
123 |
> Take for example ArchLinux which also has around 10,000 packages |
124 |
> simply because it's so easy to write them. |
125 |
> |
126 |
Ebuilds are pretty easy too imo. It's perfectly possible to write an ebuild |
127 |
without a single function, for example, if the standard |
128 |
configure --prefix=/usr and make system is in-place (and eclasses extend |
129 |
that to other systems.) |
130 |
|
131 |
> And with something that is distribution agnostic, different |
132 |
> communities can benefit from sharing the same rules. |
133 |
> |
134 |
Ebuilds and portage can be used elsewhere, see |
135 |
http://www.gentoo.org/proj/en/gentoo-alt/prefix/index.xml |
136 |
and in any case Gentoo can be, and is, used as a basis for a binary distro. |
137 |
|
138 |
>> > |
139 |
>> > The core of a distribution is the "packaging" system, and the core of |
140 |
>> > the packaging system is the building system, which has no reason not |
141 |
>> > to be distribution agnostic, and actually, packaging system agnostic. |
142 |
>> > |
143 |
>> > Why not create a new build system with a state of the art programming |
144 |
>> > language, and an advanced DSL that actually other distributions could |
145 |
>> > use? |
146 |
>> |
147 |
I personally don't see the need. |
148 |
|
149 |
|
150 |
-- |
151 |
gentoo-dev@l.g.o mailing list |