From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 91B9D1382C5 for ; Thu, 21 May 2020 20:47:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B27D1E08DD; Thu, 21 May 2020 20:47:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 97AD2E08DD for ; Thu, 21 May 2020 20:47:12 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id s19so7650251edt.12 for ; Thu, 21 May 2020 13:47:11 -0700 (PDT) X-Gm-Message-State: AOAM532NL1yofDXpqKws0p9n3O/PVs0WIJYSvfJqWb0lOf5yCJDNrDJb taHKzQhRIhD+h9S5tcSZmi7BNvr4MtcL0SlUh4U= X-Google-Smtp-Source: ABdhPJysK0MNfNZ3UmEwsYO4Es2/B1vcv67S9JH4394Vd2gwA54UrWi1hOs0TCphRQKCX5b4W8QjdkG4Hyj+XvpkQZ4= X-Received: by 2002:aa7:db45:: with SMTP id n5mr458382edt.147.1590094028696; Thu, 21 May 2020 13:47:08 -0700 (PDT) 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 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20200521173248.2297765-1-gentoo.catalyst@xxoo.ws> <20200521173248.2297765-3-gentoo.catalyst@xxoo.ws> In-Reply-To: <20200521173248.2297765-3-gentoo.catalyst@xxoo.ws> From: Matt Turner Date: Thu, 21 May 2020 13:46:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-catalyst] [PATCH 3/5] embedded/rm: use destpath to clean mergeroot To: gentoo-catalyst@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: bd999a04-3880-4d8a-b61e-35ee4a4702cc X-Archives-Hash: 13405fdbd2cd5f812e4f06fce1ade9eb On Thu, May 21, 2020 at 10:34 AM Daniel Cordero wrote: > > From: Daniel Cordero > > 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!