Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] Clean up chroot directory on success
Date: Sun, 21 Feb 2021 02:04:25
Message-Id: CAEdQ38FbhoKyxML811YH_ehHAVTNPoz-g5TGCUt3jCPWUnsfwQ@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH] Clean up chroot directory on success by Daniel Cordero
1 On Thu, Feb 4, 2021 at 6:08 AM Daniel Cordero <gentoo.catalyst@××××.ws> wrote:
2 >
3 > From: Daniel Cordero <catalyst@××××.io>
4 >
5 > The embedded and livecd-stage2 targets override the action sequence
6 > without calling set_completion_action_sequences. This would leave the
7 > temporary build environment unpacked on the filesystem.
8
9 Thanks. Seems like a good idea.
10
11 I had to rebase this, because about 10 days before this patch was sent
12 I changed the sequences to be self.function rather than "function" in
13 commit 440a379ae94e (catalyst: Store references to functions). Please
14 try to rebase your patches onto master in the future.
15
16 > Signed-off-by: Daniel Cordero <catalyst@××××.io>
17 > ---
18 > catalyst/targets/embedded.py | 2 +-
19 > catalyst/targets/livecd_stage2.py | 2 +-
20 > 2 files changed, 2 insertions(+), 2 deletions(-)
21 >
22 > diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
23 > index 918b36bf..102b5edd 100644
24 > --- a/catalyst/targets/embedded.py
25 > +++ b/catalyst/targets/embedded.py
26 > @@ -62,8 +62,8 @@ class embedded(StageBase):
27 > "empty",
28 > "clean",
29 > "capture",
30
31 I think we need to also remove capture here, since
32 set_completion_action_sequences() begins with
33
34 if "fetch" not in self.settings["options"]:
35 self.finish_sequence.append(self.capture)
36
37 I'll make that change locally when I commit this.
38
39 > - "clear_autoresume",
40 > ])
41 > + self.set_completion_action_sequences()
42 >
43 > def set_root_path(self):
44 > self.settings["root_path"] = normpath("/tmp/mergeroot")
45 > diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
46 > index 3606047f..b8bb56a2 100644
47 > --- a/catalyst/targets/livecd_stage2.py
48 > +++ b/catalyst/targets/livecd_stage2.py
49 > @@ -117,4 +117,4 @@ class livecd_stage2(StageBase):
50 > "setup_overlay",
51 > "create_iso",
52 > ])
53 > - self.finish_sequence.append("clear_autoresume")
54 > + self.set_completion_action_sequences()
55 > --
56 > 2.26.2
57 >
58 >