Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] livecd_stage2 autoresume clear
Date: Mon, 11 Apr 2016 17:40:10
Message-Id: 20160411103911.2865d836.dolsen@gentoo.org
In Reply to: [gentoo-catalyst] livecd_stage2 autoresume clear by Marco Gigante
1 On Mon, 11 Apr 2016 16:07:11 +0200
2 Marco Gigante <m.gigante@×××××××××.it> wrote:
3
4 > Hi. I'm using catalyst to generate installcd-stage2-minimal with
5 > custom changes and packages.
6 > I realized catalyst clears autoresume states once the iso image was
7 > successfully generated, regardless the fact I run catalyst with or
8 > without --clear-autoresume option.
9 >
10 > Poking around the code, for my convenience I made the change as in
11 > the attached diff (vs. master branch).
12 > Could such modification bring to unexpected behaviour?
13 >
14 > I tried with all 2.X, 3.0, and master branches seeing the same
15 > behaviour.
16 >
17 > Thanks in advance for any help.
18 > marco
19
20
21 catalyst always clears resume points when any stage has completed
22 successfully.
23
24 Why would it do anything else???
25
26 Not clearing the resume point would render the stage unable to run
27 again, skipping past everything already completed which would be the
28 whole process. That would force you to use the clear-autoresume
29 option each time you want to do a new run.
30
31 I don't understand the reasoning for this patch
32
33
34 - self.settings["action_sequence"].append("clear_autoresume")
35 + if "clear-autoresume" not in self.settings["options"]:
36 + self.settings["action_sequence"].append("clear_autoresume")
37
38 This if statement causes kind of the opposite of what I expect the
39 clear-autoresume option to do. This action sequence setting is for
40 clearing the resume points after it has successfully done all previous
41 action sequences. What you appear to be doing avove seems more like
42 the "keepwork" option. Please look at the set_completion_action_sequences()
43 function in base/stagebase.py. That is a relatively recently created
44 function which cleans up some code duplication I found. Perhaps that
45 function can apply to the livecd_stage2 operation as well. If not all
46 of it applies then you can use part of it to maintain consistent option
47 use and behaviour.
48 --
49 Brian Dolbec <dolsen>

Replies

Subject Author
Re: [gentoo-catalyst] livecd_stage2 autoresume clear Marco Gigante <m.gigante@×××××××××.it>