1 |
On 11/04/2016 19:39, Brian Dolbec wrote: |
2 |
> On Mon, 11 Apr 2016 16:07:11 +0200 |
3 |
> Marco Gigante <m.gigante@×××××××××.it> wrote: |
4 |
> |
5 |
>> Hi. I'm using catalyst to generate installcd-stage2-minimal with |
6 |
>> custom changes and packages. |
7 |
>> I realized catalyst clears autoresume states once the iso image was |
8 |
>> successfully generated, regardless the fact I run catalyst with or |
9 |
>> without --clear-autoresume option. |
10 |
>> |
11 |
>> Poking around the code, for my convenience I made the change as in |
12 |
>> the attached diff (vs. master branch). |
13 |
>> Could such modification bring to unexpected behaviour? |
14 |
>> |
15 |
>> I tried with all 2.X, 3.0, and master branches seeing the same |
16 |
>> behaviour. |
17 |
>> |
18 |
>> Thanks in advance for any help. |
19 |
>> marco |
20 |
> |
21 |
> catalyst always clears resume points when any stage has completed |
22 |
> successfully. |
23 |
> |
24 |
> Why would it do anything else??? |
25 |
|
26 |
Because during development and test it is useful to tun just some of the |
27 |
steps without going through all the steps, which is very time consuming. |
28 |
Since there is the --clear-autoresume option to explicitly clears the |
29 |
states, I assumed the default would be to not clear them. |
30 |
|
31 |
> |
32 |
> Not clearing the resume point would render the stage unable to run |
33 |
> again, skipping past everything already completed which would be the |
34 |
> whole process. That would force you to use the clear-autoresume |
35 |
> option each time you want to do a new run. |
36 |
> |
37 |
> I don't understand the reasoning for this patch |
38 |
|
39 |
Well, the patch was intended to better illustrate my question, not to |
40 |
apply it. |
41 |
|
42 |
> |
43 |
> |
44 |
> - self.settings["action_sequence"].append("clear_autoresume") |
45 |
> + if "clear-autoresume" not in self.settings["options"]: |
46 |
> + self.settings["action_sequence"].append("clear_autoresume") |
47 |
> |
48 |
> This if statement causes kind of the opposite of what I expect the |
49 |
> clear-autoresume option to do. This action sequence setting is for |
50 |
> clearing the resume points after it has successfully done all previous |
51 |
> action sequences. What you appear to be doing avove seems more like |
52 |
> the "keepwork" option. Please look at the set_completion_action_sequences() |
53 |
> function in base/stagebase.py. That is a relatively recently created |
54 |
> function which cleans up some code duplication I found. Perhaps that |
55 |
> function can apply to the livecd_stage2 operation as well. If not all |
56 |
> of it applies then you can use part of it to maintain consistent option |
57 |
> use and behaviour. |
58 |
|
59 |
oh, ok. keepwork went completely unnoticed to me. I'm running catalyst |
60 |
v2 and from there I went into the repository to look at the code. Then I |
61 |
used the latest code on master branch to illustrate my question. |
62 |
I'm pretty new to catalyst and I'm still figuring out the whole picture. |
63 |
|
64 |
Thanks for the explanation. |
65 |
marco |