1 |
On Sat, 17 Nov 2012 11:58:48 -0500 |
2 |
Mike Gilbert <floppym@g.o> wrote: |
3 |
|
4 |
> On Fri, Nov 16, 2012 at 1:44 PM, Michał Górny <mgorny@g.o> wrote: |
5 |
> > This is much more complex than the previous version. |
6 |
> > |
7 |
> |
8 |
> The inline comments and debug-print statements are helpful. |
9 |
> |
10 |
> Do we have a way to test this with various combinations of |
11 |
> PYTHON_COMPAT, PYTHON_TARGETS, eselect python, and USE_PYTHON? |
12 |
|
13 |
Well, I've just tested it by hand. If someone wants to work on bringing |
14 |
tests for it, I don't mind. To be honest, I don't really feel like they |
15 |
would be of much use. I tested and fixed what came to my head. I doubt |
16 |
tests will be able to find much (especially if I write them); live |
17 |
testing will be probably much more useful. |
18 |
|
19 |
The warning code is imperfect and mostly transitional. It tries to help |
20 |
but can't do more than PMS permits it to. It should lie there for some |
21 |
time, then we should be able to get rid of it, and forget about |
22 |
the whole thing. Considering that, writing tests is IMO mostly a waste |
23 |
of time. |
24 |
|
25 |
> I have some suggestions on the actual warning text below. |
26 |
> |
27 |
> > + if [[ ${warned} ]]; then |
28 |
> > + ewarn |
29 |
> > + ewarn "Please note that after switching the active Python interpreter," |
30 |
> > + ewarn "you may need to run 'python-updater' to ensure the system integrity." |
31 |
> |
32 |
> Change "ensure the system integrity" to something like "rebuild |
33 |
> affected packages". The former statement is awkward and doesn't really |
34 |
> explain anything. |
35 |
|
36 |
Applied. |
37 |
|
38 |
> > + if [[ ${USE_PYTHON} ]]; then |
39 |
> > + ewarn "It seems that your USE_PYTHON setting does list different Python" |
40 |
> |
41 |
> Drop "It seems that"; it softens the statement for no reason. This |
42 |
> also applies to a few statements below. |
43 |
|
44 |
Well, the main reason for that was to emphasis that the check |
45 |
is imperfect and the result simply may be wrong. How can I express that |
46 |
without adding yet another paragraph to the lengthy enough text? |
47 |
|
48 |
> The phrase "does list" looks odd in English. |
49 |
|
50 |
Right. |
51 |
|
52 |
> Replace with "Your USE_PYTHON setting lists different Python ...". |
53 |
> |
54 |
> > + ewarn "implementations than your PYTHON_TARGETS variable. Please consider" |
55 |
> > + ewarn "using the following value instead:" |
56 |
> > + ewarn |
57 |
> > + ewarn " USE_PYTHON='\033[35m${old[@]}${new[@]+ \033[1m${new[@]}}\033[0m'" |
58 |
> > + |
59 |
> > + if [[ ${removed[@]} ]]; then |
60 |
> > + ewarn |
61 |
> > + ewarn "(removed \033[31m${removed[@]}\033[0m)" |
62 |
> > + fi |
63 |
> > + else |
64 |
> > + ewarn "It seems that you need to set USE_PYTHON to make sure that legacy" |
65 |
> |
66 |
> s/It seems that you need/You should/ |
67 |
|
68 |
The same as above. Two 'it seems' with different values vs 'you should' |
69 |
with two different values. |
70 |
|
71 |
> |
72 |
> > + ewarn "packages will be built with respect to PYTHON_TARGETS correctly:" |
73 |
> > + ewarn |
74 |
> > + ewarn " USE_PYTHON='\033[35;1m${new[@]}\033[0m'" |
75 |
> > + fi |
76 |
> > + |
77 |
> > + ewarn |
78 |
> > + ewarn "Please note that after changing the USE_PYTHON variable, you may need" |
79 |
> > + ewarn "to run 'python-updater' to ensure the system integrity." |
80 |
> |
81 |
> Again, s/ensure the system integrity/rebuild affected packages/. |
82 |
|
83 |
Applied. |
84 |
|
85 |
-- |
86 |
Best regards, |
87 |
Michał Górny |