public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel Cordero <gentoo.catalyst@xxoo.ws>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH 3/5] embedded/rm: use destpath to clean mergeroot
Date: Thu, 21 May 2020 17:32:46 +0000	[thread overview]
Message-ID: <20200521173248.2297765-3-gentoo.catalyst@xxoo.ws> (raw)
In-Reply-To: <20200521173248.2297765-1-gentoo.catalyst@xxoo.ws>

From: Daniel Cordero <catalyst@0xdc.io>

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.

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'],
-- 
2.26.2



  parent reply	other threads:[~2020-05-21 17:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 17:32 [gentoo-catalyst] [PATCH 1/5] embedded: remove actions that are broken by default Daniel Cordero
2020-05-21 17:32 ` [gentoo-catalyst] [PATCH 2/5] stagebase: allow specfiles to define install_mask Daniel Cordero
2020-05-21 20:45   ` Matt Turner
2020-05-21 17:32 ` Daniel Cordero [this message]
2020-05-21 20:46   ` [gentoo-catalyst] [PATCH 3/5] embedded/rm: use destpath to clean mergeroot Matt Turner
2020-05-21 17:32 ` [gentoo-catalyst] [PATCH 4/5] embedded/root_overlay: copy root overlay into destpath Daniel Cordero
2020-05-21 20:48   ` Matt Turner
2020-05-21 17:32 ` [gentoo-catalyst] [PATCH 5/5] Allow embedded target to unpack a root_overlay Daniel Cordero
2020-05-21 20:52   ` Matt Turner
2020-05-22  3:48     ` Daniel Cordero
2020-05-21 20:41 ` [gentoo-catalyst] [PATCH 1/5] embedded: remove actions that are broken by default Matt Turner
2020-05-21 22:08   ` Brian Dolbec
2020-05-22  0:22     ` Matt Turner
2020-05-22  4:19   ` Daniel Cordero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200521173248.2297765-3-gentoo.catalyst@xxoo.ws \
    --to=gentoo.catalyst@xxoo.ws \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox