1 |
Hi Sam, |
2 |
|
3 |
Sam Pfeiffer <sammypfeiffer@×××××.com> writes: |
4 |
|
5 |
> It took me a while to figure out how to do it with minimal |
6 |
> changes... but this is the new version I came up with: |
7 |
> |
8 |
> https://gist.github.com/awesomebytes/c930100ca97dd4195123104c5396b645 |
9 |
> |
10 |
> The changes to the current bootstrap_prefix.sh are these (in .patch |
11 |
> format): |
12 |
> https://gist.github.com/awesomebytes/ab1f237feea2f51ae65a5ecca203842e |
13 |
> |
14 |
> That patch in words: I've wrapped the setup stuff in a function called |
15 |
>bootstrap_get_defaults (as that's what it is doing). Then the complete |
16 |
>bootstrap process is named bootstrap_all_stages. I also separated the |
17 |
>last step calling it bootstrap_emerge_emptytree_system. |
18 |
> |
19 |
> This keeps the usage of the script the same for the interactive case, |
20 |
> the non interactive case, but...There is a 'maybe' breaking change, as |
21 |
> now giving the name of the function to execute first calls |
22 |
> bootstrap_get_defaults, then calls the function... and does a couple |
23 |
> of necessary workarounds. |
24 |
> |
25 |
> I say 'maybe' breaking, as it doesn't 'exactly' do the same it did |
26 |
> before when executing ./bootstrap-prefix.sh EPREFIX stage2 (but I |
27 |
> think it was either broken or I don't know how it was used, which is |
28 |
> the most likely option). |
29 |
|
30 |
> If you don't like this new behaviour, my alternative implementation |
31 |
> was to create extra functions like: bootstrap_stage1_noninteractive, |
32 |
> bootstrap_stage2_noninteractive, bootstrap_stage3_noninteractive, |
33 |
> bootstrap_emerge_emptytree_system_noninteractive Which would do the |
34 |
> bootstrap_get_defaults and the workarounds. |
35 |
> |
36 |
> Let me know what you think. I can prepare a patch with that too. If |
37 |
> that's the case, I'd love an explanation on how to use the current |
38 |
> behaviour of the script. |
39 |
|
40 |
I read your patches. But I don't understand the motivation for |
41 |
completely reproduce the interactive use of bootstrap-prefix.sh by |
42 |
bootstrap_get_defaults() and bootstrap_emerge_emptytree_system(). |
43 |
|
44 |
The most important part of the CI is to test stages 1~3, because both |
45 |
the hosts and the gentoo repository are moving targets. In the past 10 |
46 |
years, there were few problems happening in bootstrap_get_defaults() and |
47 |
bootstrap_emerge_emptytree_system(), or equivalents. I would like to |
48 |
propose the 3rd way: |
49 |
|
50 |
1. set the PATH, CHOST, etc. with your CI script, |
51 |
2. bootstrap-prefix.sh stage1 |
52 |
3. bootstrap-prefix.sh stage2 |
53 |
4. bootstrap-prefix.sh stage3 |
54 |
5. call emerge -e @system with your CI script. |
55 |
|
56 |
What do you think? |
57 |
|
58 |
Yours, |
59 |
Benda |