1 |
Hello developers, |
2 |
|
3 |
|
4 |
this has annoyed me for a long time. |
5 |
|
6 |
restore_config() dies when it cannot find a saved config file, while |
7 |
later on in any ebuild that uses savedconfig.eclass, it will save the |
8 |
config file anyhow. That means it will not use an edited saved config |
9 |
file during the first emerge, which is to be expected and should not be |
10 |
fatal. |
11 |
|
12 |
The current forces you to emerge the same ebuild twice using _different_ |
13 |
USE flags to achieve anything: |
14 |
|
15 |
1. USE="-savedconfig" emerge cat/foo |
16 |
2. $EDITOR /etc/portage/savedconfig/cat/foo |
17 |
3. USE="savedconfig" emerge cat/foo |
18 |
|
19 |
This is quite illogical. |
20 |
|
21 |
With the patch applied it should be enough to set USE=savedconfig |
22 |
globally, run `emerge foo', edit the saved config file(s) and run |
23 |
`emerge foo' again, without having to change the USE flag: |
24 |
|
25 |
0. euse -E savedconfig # Set USE=savedconfig globally |
26 |
1. emerge cat/foo |
27 |
2. $EDITOR /etc/portage/savedconfig/cat/foo |
28 |
3. emerge cat/foo |
29 |
4. Profit! |
30 |
|
31 |
The attached patch actually accomplishes two things: |
32 |
|
33 |
1) It removes some old code[1] in an elif that apparently never gets |
34 |
executed (or we would have seen bash syntax bugs filed loooong ago). |
35 |
2) It makes restore_config non-fatal on the first emerge with |
36 |
USE=savedconfig. |
37 |
|
38 |
If no one objects, I will look forward to committing the patch in a |
39 |
week or two. |
40 |
|
41 |
|
42 |
Regards, |
43 |
jer |
44 |
|
45 |
|
46 |
[1] Already present in the first commit. |