1 |
On Sat, 5 Nov 2005 20:58:57 -0600 |
2 |
Jason Pepas <cell@×××××××××××.edu> wrote: |
3 |
|
4 |
> So, I have been going over how "class config" works in portage, but I |
5 |
> am still unsure of where to fit in the changes I would need. |
6 |
> |
7 |
> I suppose I'll lay out the structure of what I had in mind and ask |
8 |
> y'all for advice. |
9 |
> |
10 |
> Compression would be supported in a modular fashion. The following |
11 |
> config options would be supported for each type of compression: |
12 |
> |
13 |
> ZEXT - the compression filename extension |
14 |
> TZEXT - the binary package filename extension |
15 |
> ZCOMPRESS - the command used to compress a file |
16 |
> ZDECOMPRESS - the command used to uncompress a file |
17 |
> ZFILTER - command used to compress in a pipeline |
18 |
> ZUNFILTER - command used to uncompress in a pipeline |
19 |
> ZRECOMPRESS - should files already compressed using another method be |
20 |
> uncompressed and then recompressed using the preferred method? (ie, if |
21 |
> manpages are shipped as foo.1.gz and you want foo.1.bz2) |
22 |
|
23 |
I really don't like this Z prefix, should rather be |
24 |
PORTAGE_COMPRESS_{EXT,BINEXT,COMPRESSCOMMAND,...} |
25 |
(avoid env namespace pollution a IMO a lot cleaner) |
26 |
|
27 |
> For example, if Z="bzip2", a file would be sourced ("bzip2.sh"), which |
28 |
> would contain the these settings: |
29 |
> |
30 |
> ZEXT="bz2" |
31 |
> TZEXT="tbz2" |
32 |
> ZCOMPRESS="bzip2" |
33 |
> ZDECOMPRESS="bunzip2" |
34 |
> ZFILTER="bzip2" |
35 |
> ZUNFILTER="bunzip2" |
36 |
> ZRECOMPRESS="no" |
37 |
|
38 |
Why this indirection? Just for convienience or are there technical |
39 |
reasons? If it's just convienience then you don't need this, just |
40 |
utilize the "source" command in make.conf. Anyway, there is no place for |
41 |
one-letter vars in make.* |
42 |
|
43 |
> The following subsystems would "source" one of these files to get |
44 |
> their settings: |
45 |
> |
46 |
> PKG_ |
47 |
> DOC_ |
48 |
> MAN_ |
49 |
> INFO_ |
50 |
> |
51 |
> possibly others. |
52 |
> |
53 |
> So, if PKG_Z="bzip2", bzip2.sh would be read to set PKG_ZEXT, |
54 |
> PKG_TZEXT, PKG_ZCOMPRESS, etc. |
55 |
|
56 |
Why are those vars needed? Can't they be directly derived from the |
57 |
global ones? |
58 |
|
59 |
> As these module files are sourced, individual config options could be |
60 |
> overridden via values in the environment. For example, if I wanted |
61 |
> gzip used across the board, but I wanted different levels of |
62 |
> compression for man pages and packages, I could do this in make.conf: |
63 |
> |
64 |
> Z="gzip" |
65 |
> PKG_ZCOMPRESS="gzip --best" |
66 |
> MAN_ZCOMPRESS="gzip --fast" |
67 |
|
68 |
Somehow this part looks like overengineering to me. Doesn't seem worth |
69 |
to introduce 7*4=28 new vars just for this. |
70 |
|
71 |
Marius |
72 |
|
73 |
-- |
74 |
Public Key at http://www.genone.de/info/gpg-key.pub |
75 |
|
76 |
In the beginning, there was nothing. And God said, 'Let there be |
77 |
Light.' And there was still nothing, but you could see a bit better. |