Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 3/5] embedded/rm: use destpath to clean mergeroot
Date: Thu, 21 May 2020 20:47:13
Message-Id: CAEdQ38G7syZE-qJo+j-RZ9o1cWQsJUKwdCdUMjVz70UxKqviUA@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH 3/5] embedded/rm: use destpath to clean mergeroot by Daniel Cordero
1 On Thu, May 21, 2020 at 10:34 AM Daniel Cordero <gentoo.catalyst@××××.ws> wrote:
2 >
3 > From: Daniel Cordero <catalyst@××××.io>
4 >
5 > When using remove() with a capture subpath (e.g. the embedded target), specifying
6 > files in rm removes the files from the seed stage, not the captured stage.
7
8 Hah, nice.
9
10 > Use destpath as a base for removals. When not using a subpath, destpath
11 > equals chroot_path.
12 >
13 > Also unhardcode log prefix to match the target.
14 > ---
15 > catalyst/base/stagebase.py | 4 ++--
16 > 1 file changed, 2 insertions(+), 2 deletions(-)
17 >
18 > diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
19 > index 3e8f074e..ed9bb697 100644
20 > --- a/catalyst/base/stagebase.py
21 > +++ b/catalyst/base/stagebase.py
22 > @@ -1171,8 +1171,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
23 > for x in self.settings[self.settings["spec_prefix"] + "/rm"]:
24 > # We're going to shell out for all these cleaning
25 > # operations, so we get easy glob handling.
26 > - log.notice('livecd: removing %s', x)
27 > - clear_path(self.settings["chroot_path"] + x)
28 > + log.notice('%s: removing %s', self.settings["spec_prefix"], x)
29 > + clear_path(self.settings["destpath"] + x)
30 > try:
31 > if os.path.exists(self.settings["controller_file"]):
32 > cmd([self.settings['controller_file'], 'clean'],
33
34 Looks good. Thanks!