1 |
So, I have been going over how "class config" works in portage, but I am |
2 |
still unsure of where to fit in the changes I would need. |
3 |
|
4 |
I suppose I'll lay out the structure of what I had in mind and ask y'all |
5 |
for advice. |
6 |
|
7 |
Compression would be supported in a modular fashion. The following |
8 |
config options would be supported for each type of compression: |
9 |
|
10 |
ZEXT - the compression filename extension |
11 |
TZEXT - the binary package filename extension |
12 |
ZCOMPRESS - the command used to compress a file |
13 |
ZDECOMPRESS - the command used to uncompress a file |
14 |
ZFILTER - command used to compress in a pipeline |
15 |
ZUNFILTER - command used to uncompress in a pipeline |
16 |
ZRECOMPRESS - should files already compressed using another method be |
17 |
uncompressed and then recompressed using the preferred method? (ie, if |
18 |
manpages are shipped as foo.1.gz and you want foo.1.bz2) |
19 |
|
20 |
For example, if Z="bzip2", a file would be sourced ("bzip2.sh"), which |
21 |
would contain the these settings: |
22 |
|
23 |
ZEXT="bz2" |
24 |
TZEXT="tbz2" |
25 |
ZCOMPRESS="bzip2" |
26 |
ZDECOMPRESS="bunzip2" |
27 |
ZFILTER="bzip2" |
28 |
ZUNFILTER="bunzip2" |
29 |
ZRECOMPRESS="no" |
30 |
|
31 |
The following subsystems would "source" one of these files to get their |
32 |
settings: |
33 |
|
34 |
PKG_ |
35 |
DOC_ |
36 |
MAN_ |
37 |
INFO_ |
38 |
|
39 |
possibly others. |
40 |
|
41 |
So, if PKG_Z="bzip2", bzip2.sh would be read to set PKG_ZEXT, PKG_TZEXT, |
42 |
PKG_ZCOMPRESS, etc. |
43 |
|
44 |
So, if you wanted everything on your system to use bzip2 compression, |
45 |
you would set: |
46 |
|
47 |
Z="bzip2" |
48 |
|
49 |
in make.conf. All of the subsystems would fall in line with this default, |
50 |
top-level setting. |
51 |
|
52 |
If you wanted gzipp'ed packages and lzop'ed man pages, but wanted |
53 |
everything else bzip2, you would do this: |
54 |
|
55 |
Z="bzip2" |
56 |
PKG_Z="gzip" |
57 |
MAN_Z="lzop" |
58 |
|
59 |
So, PKG_ZEXT, PKG_ZCOMPRESS, etc would all be set using gzip.sh, and |
60 |
MAN_ZFILTER, MAN_ZRECOMPRESS, etc would all be set using lzop.sh. |
61 |
|
62 |
As these module files are sourced, individual config options could be |
63 |
overridden via values in the environment. For example, if I wanted gzip |
64 |
used across the board, but I wanted different levels of compression for |
65 |
man pages and packages, I could do this in make.conf: |
66 |
|
67 |
Z="gzip" |
68 |
PKG_ZCOMPRESS="gzip --best" |
69 |
MAN_ZCOMPRESS="gzip --fast" |
70 |
|
71 |
ideas? |
72 |
|
73 |
-jason pepas |
74 |
|
75 |
-- |
76 |
gentoo-portage-dev@g.o mailing list |