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 B2F9E59CB1 for ; Tue, 12 Apr 2016 06:37:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5A7B21C008; Tue, 12 Apr 2016 06:37:46 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (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 2802821C008 for ; Tue, 12 Apr 2016 06:37:45 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id l6so173859389wml.1 for ; Mon, 11 Apr 2016 23:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nextworks-it.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Bffa1Tk2m7w6uqmKakR4anRuLyXiWul93T6qur6J9Mk=; b=iXSKzyBONfFPR7soDop01mkkf/lo/F9ySR3C72lKlHWrMJ95Y4csgogyR7/tXoxm9i yr3KJ5EtnG8tbF92l09Uid8qZcIlARmHhI5v1It0TbnRhjoLMwI+TrqQ6lUvf5rdrN6r KAI/G9xqYreGmYYtcdBGgVodK7YiZ2vljpTmyL34O5OBLlvThJJwAKUl+ZXjftZIuqTB O7O9QbhP7QpsBp8rXW9LFK+/PupltMBdQiyVBLPDZG1GfnogAtiNDCSlY8vFo2sIZrGC 5fw9NSYeZ0a2NLf5++hrEd+iV3z+RsB3CTbtb3KrnJFRFsI9J4e4k4XSXttM/8k+iuw+ vEFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=Bffa1Tk2m7w6uqmKakR4anRuLyXiWul93T6qur6J9Mk=; b=RbLHn+4qn6tbkE3Jl7gK2bt0Sswf9jXfI1SevYVcpyNHZy29BkUbt1LCvZ1un9H3Vt 9+uZkq4K2uSlVhgBmVJiyodXrGetZDubHZSsQn4cmFV0hIevNgMA43hiSHDUbvzNhy2O +jlakdofIMU4jJyMW5zMWAT7MnQv7BSqfGW/xE8p9HVLJ2RwRujgh30cqNg2xmibwQE9 J7sBecFFY/LUdQ28etADOjpbbulfQlv3vAswRyVnoPkkxzXsklEPpDZ48ZhF+WAAt1EG zcDVBccq1EIaWPIFoslh661khL2WbRpPxJ0r7T6q6FL2CDGcHT2LhX+JO24wKujVCZ8A birw== X-Gm-Message-State: AD7BkJLKBfjU282cikkRVH8++RxMZZe4R3trQtvAifKMImahi7le1yf2+v+n7nHYlWJn8w== X-Received: by 10.28.6.139 with SMTP id 133mr22941741wmg.84.1460443064480; Mon, 11 Apr 2016 23:37:44 -0700 (PDT) Received: from [10.0.2.148] ([213.182.68.158]) by smtp.gmail.com with ESMTPSA id w79sm20044136wme.19.2016.04.11.23.37.42 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Apr 2016 23:37:43 -0700 (PDT) Subject: Re: [gentoo-catalyst] livecd_stage2 autoresume clear To: gentoo-catalyst@lists.gentoo.org References: <570BAF8F.6040809@nextworks.it> <20160411103911.2865d836.dolsen@gentoo.org> From: Marco Gigante Organization: Nextworks Srl Message-ID: <570C97B0.7040604@nextworks.it> Date: Tue, 12 Apr 2016 08:37:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 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 In-Reply-To: <20160411103911.2865d836.dolsen@gentoo.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 2c4e98c8-b0b2-4145-9f0e-575cab559766 X-Archives-Hash: 8be7dfe0657301e90f0230ddbaad6742 On 11/04/2016 19:39, Brian Dolbec wrote: > 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??? Because during development and test it is useful to tun just some of the steps without going through all the steps, which is very time consuming. Since there is the --clear-autoresume option to explicitly clears the states, I assumed the default would be to not clear them. > > 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 Well, the patch was intended to better illustrate my question, not to apply it. > > > - 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. oh, ok. keepwork went completely unnoticed to me. I'm running catalyst v2 and from there I went into the repository to look at the code. Then I used the latest code on master branch to illustrate my question. I'm pretty new to catalyst and I'm still figuring out the whole picture. Thanks for the explanation. marco