1 |
Le Mardi 29 Avril 2003 22:12, Vano D a écrit : |
2 |
| Hi Panard, |
3 |
| |
4 |
| How about adding a little functionality to the script so it keeps which |
5 |
| USE vars the user chooses in a file like |
6 |
| /var/db/pkg/app-editors/vim-6.1-r21/USECUSTOM (that would be for vim :)? |
7 |
| I have checked the USE files but they all contain the complete $USE |
8 |
| variable when the package was emerged. So maybe if you add the |
9 |
| functionality so it adds a USECUSTOM file containing the USE vars the |
10 |
| user has chosen interactively then you could have an option at the |
11 |
| beginning of the interactive command asking: |
12 |
| |
13 |
| "Use previous USE flags for this package? (X gtk etc..) [Y/n]" |
14 |
| |
15 |
| If the user says Y, then you would extract the USE flags from USECUSTOM |
16 |
| and use those. |
17 |
| |
18 |
| Also you could have a commandline option such as --usecustom or |
19 |
| something like that, so if the user calls emerge-interactive with that |
20 |
| flag it skips all questions and uses the previously kept USE flags. |
21 |
| |
22 |
| Of course this would only work if you only used emerge-interactive |
23 |
| since emerge doesnt create any USECUSTOM files :) But I don't think this |
24 |
| is a big problem. In any case if emerge-interactive doesn't find any |
25 |
| CUSTOMFILE then it asks the users for USE flags just like now. |
26 |
| |
27 |
| This solves the scalibility problem and gives the user best of both |
28 |
| worlds. What do you think? |
29 |
| |
30 |
| Regards. |
31 |
|
32 |
|
33 |
|
34 |
Ok, I've apply theses changes (I join the emerge-interactive file) : |
35 |
|
36 |
-> there is a /var/db/pkg/CATEG/PKG/USECUSTOM : |
37 |
ask to use this file y or n : |
38 |
y : we load the values of the file |
39 |
n : we ask for the new values, when, (re-)create |
40 |
/var/db/pkg/CATEG/PKG/USECUSTOM |
41 |
-> no file we do exactly like if the user answer n to the previous question |
42 |
|
43 |
|
44 |
|
45 |
Please test this script (I made some merge and it was working) |
46 |
|
47 |
Thanks, |
48 |
|
49 |
Panard |
50 |
-- |
51 |
________________________________________________________ |
52 |
panard@×××××××.org http://www.inzenet.org |
53 |
|
54 |
"Computers are like air-conditioners, they stop working properly when you open |
55 |
Windows." |