From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] livecd_stage2 autoresume clear
Date: Mon, 11 Apr 2016 10:39:11 -0700 [thread overview]
Message-ID: <20160411103911.2865d836.dolsen@gentoo.org> (raw)
In-Reply-To: <570BAF8F.6040809@nextworks.it>
On Mon, 11 Apr 2016 16:07:11 +0200
Marco Gigante <m.gigante@nextworks.it> wrote:
> Hi. I'm using catalyst to generate installcd-stage2-minimal with
> custom changes and packages.
> I realized catalyst clears autoresume states once the iso image was
> successfully generated, regardless the fact I run catalyst with or
> without --clear-autoresume option.
>
> Poking around the code, for my convenience I made the change as in
> the attached diff (vs. master branch).
> Could such modification bring to unexpected behaviour?
>
> I tried with all 2.X, 3.0, and master branches seeing the same
> behaviour.
>
> Thanks in advance for any help.
> marco
catalyst always clears resume points when any stage has completed
successfully.
Why would it do anything else???
Not clearing the resume point would render the stage unable to run
again, skipping past everything already completed which would be the
whole process. That would force you to use the clear-autoresume
option each time you want to do a new run.
I don't understand the reasoning for this patch
- self.settings["action_sequence"].append("clear_autoresume")
+ if "clear-autoresume" not in self.settings["options"]:
+ self.settings["action_sequence"].append("clear_autoresume")
This if statement causes kind of the opposite of what I expect the
clear-autoresume option to do. This action sequence setting is for
clearing the resume points after it has successfully done all previous
action sequences. What you appear to be doing avove seems more like
the "keepwork" option. Please look at the set_completion_action_sequences()
function in base/stagebase.py. That is a relatively recently created
function which cleans up some code duplication I found. Perhaps that
function can apply to the livecd_stage2 operation as well. If not all
of it applies then you can use part of it to maintain consistent option
use and behaviour.
--
Brian Dolbec <dolsen>
next prev parent reply other threads:[~2016-04-11 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 14:07 [gentoo-catalyst] livecd_stage2 autoresume clear Marco Gigante
2016-04-11 17:39 ` Brian Dolbec [this message]
2016-04-12 6:37 ` Marco Gigante
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160411103911.2865d836.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox