From nobody Tue Feb 10 00:40:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1669904781208596.9656256241756; Thu, 1 Dec 2022 06:26:21 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.450780.708237 (Exim 4.92) (envelope-from ) id 1p0kVl-00026C-3R; Thu, 01 Dec 2022 14:26:01 +0000 Received: by outflank-mailman (output) from mailman id 450780.708237; Thu, 01 Dec 2022 14:26:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0kVk-00024m-SC; Thu, 01 Dec 2022 14:26:00 +0000 Received: by outflank-mailman (input) for mailman id 450780; Thu, 01 Dec 2022 14:26:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0kVk-0001kY-0X for xen-devel@lists.xenproject.org; Thu, 01 Dec 2022 14:26:00 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 134ff323-7184-11ed-8fd2-01056ac49cbb; Thu, 01 Dec 2022 15:25:59 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 646AFED1; Thu, 1 Dec 2022 06:26:05 -0800 (PST) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1CCC43F73D; Thu, 1 Dec 2022 06:25:58 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 134ff323-7184-11ed-8fd2-01056ac49cbb From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: michal.orzel@amd.com, Doug Goldstein , Stefano Stabellini Subject: [PATCH v6 2/3] automation: Add a clean rule for containers Date: Thu, 1 Dec 2022 14:25:31 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1669904782424100001 Content-Type: text/plain; charset="utf-8" Add make clean support to remove the containers from the local docker registry. make clean- must be called to remove an image: make clean-yocto/kirkstone-qemuarm: remove yocto kirkstone for qemuarm image Signed-off-by: Bertrand Marquis Acked-by: Stefano Stabellini Reviewed-by: Michal Orzel --- Changes in v6: - Rework clean rule to prevent calling docker during make parsing Changes in v5: - remove cleaning of all images using make clean Changes in v4: - also generate clean rule for CONTAINERS_EXTRA Changes in v3: - none Changes in v2: - none Changes in v1: - patch added --- automation/build/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/automation/build/Makefile b/automation/build/Makefile index c4aaa747ffdf..f1d56ce532a1 100644 --- a/automation/build/Makefile +++ b/automation/build/Makefile @@ -28,3 +28,13 @@ all: $(CONTAINERS) clean: rm -f yocto/*.dockerfile =20 +define CLEAN_RULE +.PHONY: clean-$(1) +clean-$(1): + if [ -n "$$$$(docker image ls -q $(REGISTRY)/$(subst /,:,$(1)))" ]; then \ + docker image rm $(REGISTRY)/$(subst /,:,$(1)); \ + fi + +endef + +$(eval $(foreach img,$(CONTAINERS) $(CONTAINERS_EXTRA),$(call CLEAN_RULE,$= (img)))) --=20 2.25.1