1 |
Hello, all. |
2 |
|
3 |
Some time ago I wrote a small tool called install-mask. As the name |
4 |
suggests, it was intended to help with manipulating INSTALL_MASK. |
5 |
I think that its most important feature was ability to use pre-defined |
6 |
mask lists to easily mask unwanted directories without getting into |
7 |
the details. |
8 |
|
9 |
For example, you could do: |
10 |
|
11 |
install-mask -a systemd |
12 |
|
13 |
and it masked all directories related to systemd that were safe to be |
14 |
masked. |
15 |
|
16 |
The original solution had a few weak points, however, and since it was |
17 |
an external tool it didn't help most of the Gentoo users. For this |
18 |
reason, I wanted to implement the necessary bits in portage itself. Now |
19 |
kensington reminded me of it and offered to work on it, so I'd like to |
20 |
revive the topic. |
21 |
|
22 |
What we need is an agreement where to put the 'mask lists'. That is, we |
23 |
need a mapping of pre-defined keys to descriptions & lists of paths. |
24 |
I have two ideas. |
25 |
|
26 |
|
27 |
IDEA ONE |
28 |
|
29 |
I'm thinking of doing something similar to USE_EXPAND. That is, |
30 |
a structure like: |
31 |
|
32 |
- a top-level install-mask.desc that keeps mapping of keys to |
33 |
descriptions, |
34 |
|
35 |
- install-mask directory where each file name matches the install-mask |
36 |
key and file contents list all the paths. |
37 |
|
38 |
For example: |
39 |
|
40 |
install-mask.desc: |
41 |
|
42 |
bash-completion: app-shells/bash completions |
43 |
systemd: sys-apps/systemd unit files and auxiliary files |
44 |
|
45 |
install-mask/bash-completion: |
46 |
|
47 |
/usr/share/bash-completion |
48 |
|
49 |
install-mask/systemd: |
50 |
|
51 |
/usr/lib/systemd/system |
52 |
/usr/lib/systemd/user |
53 |
|
54 |
|
55 |
IDEA TWO |
56 |
|
57 |
A single file with ini-like syntax (alike layout.conf) that holds all |
58 |
the info. Such file can be found already in |
59 |
$PORTDIR/app-portage/install-mask/files/location-db.conf: |
60 |
|
61 |
Example contents: |
62 |
|
63 |
[systemd] |
64 |
path=/usr/lib/systemd/system |
65 |
path=/usr/lib/systemd/user |
66 |
description=systemd unit and auxiliary files. |
67 |
|
68 |
[bash-completion] |
69 |
path=/usr/share/bash-completion |
70 |
|
71 |
|
72 |
In both cases, the keys could be put into INSTALL_MASK in make.conf: |
73 |
|
74 |
INSTALL_MASK="systemd bash-completion" |
75 |
|
76 |
What are your thoughts? |
77 |
|
78 |
-- |
79 |
Best regards, |
80 |
Michał Górny |