1 |
On Tuesday 02 October 2007, Roy Marples wrote: |
2 |
> On Tue, 2007-10-02 at 09:29 +0200, Fabian Groffen wrote: |
3 |
> > On 01-10-2007 22:59:40 +0100, Roy Marples wrote: |
4 |
> > > I would like to propse a new versionator.eclass for consideration |
5 |
> > > (attached). |
6 |
> > > |
7 |
> > > This version, I believe, is more readable and maintainable then the one |
8 |
> > > currently in portage. It also uses a lot less code and has the bonus of |
9 |
> > > being pure sh. |
10 |
> > |
11 |
> > What is your rationale to say that "pure sh" is a "bonus"? Especially |
12 |
> > given the environment this is used in as ferdy already pointed out? |
13 |
> |
14 |
> The bonus is that it works on shells other than bash. |
15 |
|
16 |
which is irrelevant here |
17 |
|
18 |
> > I personally like consistency. So if we use bash in ebuilds, then I'd |
19 |
> > like to use bash in eclasses too. I'm interested in your motivation to |
20 |
> > make this eclass "pure sh", whatever that may mean. |
21 |
> |
22 |
> I like consistency too, and I'll be pushing for using sh instead of |
23 |
> forcing bash. |
24 |
|
25 |
pushing a new standard by slowly converting the tree is not the way to go. |
26 |
|
27 |
> My motivation? Simple. I don't believe that the portage tree should be |
28 |
> locked into using one shell. I believe that vendor lock-in should happen |
29 |
> at the social level, not the technical one. portage itself was a lock-in |
30 |
> until until PMS came about, now I'd like to remove the lock-in from the |
31 |
> tree itself. This in itself is a good thing as we can pick and choose |
32 |
> the tools we want to use as they're all playing on the same field. |
33 |
|
34 |
POSIX lacks useful bash extensions that are used heavily ... arrays, string |
35 |
replacements, pattern matching with [[ == ]] to name some. here's |
36 |
your "technical" reason for using the bash standard over POSIX: it's |
37 |
superior. |
38 |
|
39 |
> This same rationale applies to scriptlets outside portage tree use, such |
40 |
> as revdep-rebuild [1]. It's more of a bashlet, but I've also |
41 |
> demonstrated that there was no reason to force bash there. |
42 |
|
43 |
not really ... there's a reason the environment dictated inside of the package |
44 |
manager requires GNU stuff ... the extensions provided make life easy. all |
45 |
this conversion from trivial GNU extensions to limited POSIX interfaces is a |
46 |
pita (as can trivially be seen with find and xargs). as for "no reason", |
47 |
just because it can be done differently doesnt mean it should. |
48 |
-mike |