From nobody Mon Feb 9 22:05:13 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 1669810576005925.4292006082568; Wed, 30 Nov 2022 04:16:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.449848.706863 (Exim 4.92) (envelope-from ) id 1p0M0H-0006E6-Kr; Wed, 30 Nov 2022 12:15:53 +0000 Received: by outflank-mailman (output) from mailman id 449848.706863; Wed, 30 Nov 2022 12:15:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0M0H-0006Dr-HN; Wed, 30 Nov 2022 12:15:53 +0000 Received: by outflank-mailman (input) for mailman id 449848; Wed, 30 Nov 2022 12:15:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0M0G-0005h2-8z for xen-devel@lists.xenproject.org; Wed, 30 Nov 2022 12:15:52 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id b9e5904a-70a8-11ed-91b6-6bf2151ebd3b; Wed, 30 Nov 2022 13:15:50 +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 932D21042; Wed, 30 Nov 2022 04:15:55 -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 51D583F73D; Wed, 30 Nov 2022 04:15:48 -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: b9e5904a-70a8-11ed-91b6-6bf2151ebd3b From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: michal.orzel@amd.com, Doug Goldstein , Stefano Stabellini Subject: [PATCH v5 2/3] automation: Add a clean rule for containers Date: Wed, 30 Nov 2022 12:15:08 +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: 1669810577447100005 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 Reviewed-by: Michal Orzel --- 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 72a5335baec1..4cbb1365f94e 100644 --- a/automation/build/Makefile +++ b/automation/build/Makefile @@ -28,3 +28,13 @@ all: $(CONTAINERS) clean: rm -f yocto/*.dockerfiles =20 +define CLEAN_RULE +.PHONY: clean-$(1) +clean-$(1): +ifneq ($$(shell docker image ls -q $(REGISTRY)/$(subst /,:,$(1))),) + docker image rm $(REGISTRY)/$(subst /,:,$(1)) +endif + +endef + +$(eval $(foreach img,$(CONTAINERS) $(CONTAINERS_EXTRA),$(call CLEAN_RULE,$= (img)))) --=20 2.25.1