From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 32BD659CB1 for ; Mon, 11 Apr 2016 17:40:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2677121C00A; Mon, 11 Apr 2016 17:40:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0CFE21C00A for ; Mon, 11 Apr 2016 17:40:07 +0000 (UTC) Received: from professor-x (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 5C8323408A2 for ; Mon, 11 Apr 2016 17:40:05 +0000 (UTC) Date: Mon, 11 Apr 2016 10:39:11 -0700 From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] livecd_stage2 autoresume clear Message-ID: <20160411103911.2865d836.dolsen@gentoo.org> In-Reply-To: <570BAF8F.6040809@nextworks.it> References: <570BAF8F.6040809@nextworks.it> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 99e7ceb8-e44e-49dd-a67a-40905f8ef1b4 X-Archives-Hash: 3742f692a94f7ef627cb48628f351d47 On Mon, 11 Apr 2016 16:07:11 +0200 Marco Gigante 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