On Thu, May 21, 2020 at 10:34 AM Daniel Cordero <[email protected]> wrote:
>
> From: Daniel Cordero <[email protected]>
>
> When using remove() with a capture subpath (e.g. the embedded target), 
> specifying
> files in rm removes the files from the seed stage, not the captured stage.

Hah, nice.

> Use destpath as a base for removals. When not using a subpath, destpath
> equals chroot_path.
>
> Also unhardcode log prefix to match the target.
> ---
>  catalyst/base/stagebase.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
> index 3e8f074e..ed9bb697 100644
> --- a/catalyst/base/stagebase.py
> +++ b/catalyst/base/stagebase.py
> @@ -1171,8 +1171,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
>                  for x in self.settings[self.settings["spec_prefix"] + "/rm"]:
>                      # We're going to shell out for all these cleaning
>                      # operations, so we get easy glob handling.
> -                    log.notice('livecd: removing %s', x)
> -                    clear_path(self.settings["chroot_path"] + x)
> +                    log.notice('%s: removing %s', 
> self.settings["spec_prefix"], x)
> +                    clear_path(self.settings["destpath"] + x)
>                  try:
>                      if os.path.exists(self.settings["controller_file"]):
>                          cmd([self.settings['controller_file'], 'clean'],

Looks good. Thanks!

Reply via email to