1 |
On Mon, Sep 10, 2012 at 01:28:23AM +0000, Duncan wrote: |
2 |
> Brian Harring posted on Sun, 09 Sep 2012 15:10:27 -0700 as excerpted: |
3 |
> |
4 |
> > [Current profile config to to mask the USE=introspection |
5 |
> > globally, but unmask it for app-crypt/gcr]: |
6 |
> > |
7 |
> > use.mask: |
8 |
> > introspection |
9 |
> > |
10 |
> > package.use.mask: |
11 |
> > app-crypt/gcr -introspection |
12 |
> |
13 |
> > [Suggest killing package.* content, folding it into use.*] |
14 |
> |
15 |
> > use.mask: |
16 |
> > * introspection |
17 |
> > app-cryt/gcr -introspection |
18 |
> |
19 |
> > Specifically, collapsing: |
20 |
> > package.use.mask, use.mask -> use.mask |
21 |
> > package.use.force, use.force -> use.force |
22 |
> > package.use.stable.mask, use.stable.mask -> use.stable.mask |
23 |
> > package.use.stable.force, use.stable.force -> use.stable.force |
24 |
> |
25 |
> You mention doing this for the profile. |
26 |
|
27 |
Not 'mention' the proposal *is a profiles modification* in entirety, |
28 |
nothing else. |
29 |
|
30 |
Reorganizing the questions into user configuration (aka, the PM |
31 |
authors choice of what they want to do in /etc/portage/profiles), and |
32 |
PMS profiles (aka, what can be done in gentoo-x86). |
33 |
|
34 |
user config first: |
35 |
|
36 |
> ?? Would user's package.* and general make.conf settings remain the same? |
37 |
|
38 |
That's the PM's decision. Knowing portage source, I'd expect it'll |
39 |
wind up enabling that in parallel to the existing for it's user |
40 |
configuration. |
41 |
|
42 |
|
43 |
> ?? What about user's existing /etc/portage/profile overrides, if any? |
44 |
|
45 |
Same response; that's the PMs decision. What Zac does, is what Zac |
46 |
does. |
47 |
|
48 |
> ?? And if they change, are you proposing a script that a user can run to |
49 |
> automate the process, or simply a news item pointing to the appropriate |
50 |
> gentoo profile upgrade documentation page, or ?? |
51 |
|
52 |
{ cat use.mask | sed -e 's:^:* :'; cat package.use.mask; } > t \ |
53 |
&& mv t use.mask && rm package.use.mask |
54 |
|
55 |
|
56 |
Actual PMS profiles question: |
57 |
|
58 |
> ?? Are you proposing the change be only for new profiles, eventually |
59 |
> deprecating the old ones, thus having the PMs (and devs maintaining |
60 |
> profiles) support both methods for awhile much as the cascading profiles |
61 |
> migration was handled? |
62 |
|
63 |
Profile nodes are EAPI versioned; what I want, is effectively >=EAPI-5 |
64 |
(or 6 if people get cranky about minor mods), is this to be the |
65 |
default in new EAPI profile nodes. |
66 |
|
67 |
Meaning if someone uses a EAPI5 profile node in gentoo-x86, they don't |
68 |
use package.use.mask, they use the syntax I mentioned, and do it |
69 |
within use.mask. |
70 |
|
71 |
There will not be maintaining in parallel; there isn't a point. |
72 |
|
73 |
|
74 |
Basically, this is a ~70 file reduction of profiles; 253 -> 184 |
75 |
roughly. Aside from less general IO (not much, but some), it also |
76 |
kills of the question for devs as to which comes first; use.mask or |
77 |
package.use.mask. Ordering of the file would rule in the new scheme. |
78 |
|
79 |
Frankly if we wanted to, we could push this further; use.force and |
80 |
use.mask basically operate in a ternary space: -1, 0, +1; meaning |
81 |
"Forced off", "configurable", and "enforced on"; respecitively such a |
82 |
syntax would be -use, use, +use. |
83 |
|
84 |
Thus the following: |
85 |
use.mask: |
86 |
blah |
87 |
-monkeys # Note this is a negation of the parents masking of 'monkeys' |
88 |
-foon # Negation of the parents masking |
89 |
|
90 |
package.use.mask: |
91 |
dev-util/bsdiff foon |
92 |
|
93 |
use.force: |
94 |
x |
95 |
-y # negation of the parents forcing |
96 |
monkeys # Note we're explicitly forcing monkeys on after reversing |
97 |
# masking |
98 |
|
99 |
package.use.force |
100 |
dev-util/diffball strip |
101 |
|
102 |
that translates out to basically thus: |
103 |
|
104 |
use.enforced: |
105 |
# This globally disables 'blah', globally forces 'monkeys', |
106 |
# and resets 'foon' back to user controllable. |
107 |
* -blah +monkeys foon |
108 |
# Disable blah for dev-util/bsdiff. |
109 |
dev-util/bsdiff -foon |
110 |
# Force strip for dev-util/diffball. |
111 |
dev-util/diffball +strip |
112 |
|
113 |
|
114 |
The benefit of such an aproach is that |
115 |
1) I'd argue it's easier on the dev for processing it- just proceed |
116 |
top down, for the pkg in question considering if each leading |
117 |
restriction (* or the atom) matches, then applying the resultant |
118 |
settings. |
119 |
|
120 |
2) This actually is basically what the PM does now, although it does |
121 |
so via grabbing the content from multiple files. |
122 |
|
123 |
|
124 |
In terms of performance gain, couldn't say frankly; pkgcore already |
125 |
does a variant of this, re-rendering each cat/pkg restriction set so |
126 |
as to avoid having to do the resolution multiple times (this helps |
127 |
repoman/pcheck speed for example). |
128 |
|
129 |
That said I'm not sure if folks would go for the ternary usage there. |
130 |
Where that scheme to be applied to our profiles, it'd knock the inode |
131 |
count for these files down to 127. Not the driving reason for it, but |
132 |
a nice benefit. |
133 |
~harring |