From patchwork Mon Dec 16 05:59:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3984 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 16 Dec 2024 06:51:32 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f189.google.com (mail-pf1-f189.google.com [209.85.210.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4BG5pU6g023333 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Dec 2024 06:51:31 +0100 Received: by mail-pf1-f189.google.com with SMTP id d2e1a72fcca58-725e59e41d2sf3424951b3a.0 for ; Sun, 15 Dec 2024 21:51:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734328285; cv=pass; d=google.com; s=arc-20240605; b=kFnp7d27tjHoor/j97HEQXcGcqFIek5Kvc+c4eC9GaiWlDYUiJHPlc0ij4s+Bug9ic 5YEixatKiuSykkDLJfjGz8z2mjzZgQozJvgtX3XzXtKYU7Ng+BN/Vb4jV7k8rm6i02IC kIuQLWw1dy6oUokzwWzukZUwUBO4xy4WVV+ifAjmXvq448VY8zuRebpiXwvOWQ/0V2Nz tSWbZZ9VXdtn6hCYiQu1/K3gpk5Jk3DBryH8YVLESJqWDVo0NDpvO6OAJwR7jIl5SohA GMWsteT9CeY0aJuEggI5xPZef7Pt4zgwUBE4qsGfz66twHHSBoMucKIUZS1fk+3bC3ly SiQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g5dSRMHnVveHOBy5tzxH26oCREYFDFs4312c6W5GCY0=; fh=mlD50cau/AC1lzH7RVRIUVagT/WA/p1XrBmchbjtO9o=; b=A6Wt8TAbg5laug6df+yp4Zzztbr53o9HyLr3OZXiakCuLmefk8bw3uwfXQmgy1AqxA mvIdYR2E6xUI2gT/XSdiHE4cKQNZJMVSq91QskpxycYAT3rHy/XwbAHZvIneuI2LXoqx AzDC9HBeRVmWF/P285WzjOo5GhJLoVVS60fN+pUngizl5KQr+0PxkHllm3ZOqms1SJ/R cQJs9Ssq7PBMM9KBNaFO+4Yr/lVDzIMIVFCRwQD0fpkSv2FrmnOSHgn1lSSF7ysGE1Lg 7hS7Qt5BJ1aRbUX7Tc/nuSNnstvsmubSbOvzFP3i7ktPJxF9mkIEIjSGlFcX2MJyNhjk 6+RQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=ZEVIAu2r; spf=pass (google.com: domain of fm-1324425-2024121605512073448f699e8d252012-_sizb0@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-2024121605512073448f699e8d252012-_SIZb0@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1734328285; x=1734933085; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=g5dSRMHnVveHOBy5tzxH26oCREYFDFs4312c6W5GCY0=; b=qCL0D9tbHeJzbrBRinhoJgI2rQNfCZ1br5prrL8w0x8WLfB97xcY0M7fD0p0Blxp+E FzPc+zDczKdt25bJLz5VPfTSzXHjacL+Vnv1h05yuT2Sa26vTruCHmzU0OzgusBhjAap wqm9ewXFfhQXFyYmkmqePtAJSaeHaYwwZAGdIdpDzpNGc22rdKcrzMyfksjaw1pJYSqV hzPUJke4eEYhP3R3gdB3U9qjLru8shfRo+BXySKGCmm2xefLtShKecJFpdH6GjkL6Wu4 76yawOVxFVDRLr7zOK4xLTMI+HcTeVa4sfszkB/K1u9fCL6A6qO4nNA18r9IDjvK260d kEOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734328285; x=1734933085; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g5dSRMHnVveHOBy5tzxH26oCREYFDFs4312c6W5GCY0=; b=IFTwi5vHIhX01VMuUk4wiuUzxKcBDw37MHo4nGmQocxj7zwD/5GJv5RvNKGGvdaunH 8kKAMCAAsSfBR8D5cwka29fO7p7pbNt1gUhfDG7vd0z1F3mqcaGZfDu4v1yNsP5/7dA1 z4M3u1Qo6nyNHx3QYlRxx2Ez+SArJnazWt6aSS8SMULlmohh8X1mvMEYbenDsFppe2KN OHw/kcbCGYla+V4O2c69tzRWY8Mbxpzd25l8NnVUNBcdxqOFOlhrGL0iWLcPAcZ/Dy3E Q03LpL+JWq0HVowRTWJ2sziF/y31qkAmoMOyGhIEnFA1iX03E4P9wvgCzPi4POADtsyb lLCA== X-Forwarded-Encrypted: i=2; AJvYcCXvf2fLEJucn9FNKGmnkh3Z71GTTECopd0GT2tW2Y8ZE7fpSbqv9qfLH6qsYdmn5ucqKbSmm8w=@isar-build.org X-Gm-Message-State: AOJu0Yyb6AuIccbY5AXmLBWxna4pubCimK4vNhibOge/rhoBHz82gDSM Jn+Y2zz+TQ6oNIZczwsEx4zagyNkF4FlJERHCY53feGqMeicHPU9 X-Google-Smtp-Source: AGHT+IFfT5eXtGTUAReP+BpMqE0+rHIb5kOA1KQ943bHv13P6p0IV8aNAy6h917q/hyPxU62tqPHfA== X-Received: by 2002:aa7:8890:0:b0:725:aa5d:f217 with SMTP id d2e1a72fcca58-7290c15fe3fmr13498372b3a.7.1734328284413; Sun, 15 Dec 2024 21:51:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:f0a:b0:725:c8f1:7030 with SMTP id d2e1a72fcca58-7290cb78850ls2756282b3a.2.-pod-prod-01-us; Sun, 15 Dec 2024 21:51:23 -0800 (PST) X-Received: by 2002:a05:6a00:1483:b0:728:e906:e45a with SMTP id d2e1a72fcca58-7290c269159mr17838994b3a.24.1734328283020; Sun, 15 Dec 2024 21:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734328283; cv=none; d=google.com; s=arc-20240605; b=UskSK3/2XxGlvY55jWi7HHCCCpLlf6i29Eb98IZV4A0kEyOqVauMtz4bI+Gd81h/yS 0Pk8K+FImY31bhMEWXlSZ2mJtfqFVVMzK4CjQ7J6KTMf0lz3KI1B4kBqOLbQy85BnbHS DT9C7Ok8EakY8Brn8ISd7cEx8E8Kn8YizhG8741QyNTBFlUcl3aFcoSOHkIfwQ9rgojC ln/Oo0k/1yoniHHgB937tzdBPTqooCYl0Kh6hX/Yjh1frhPi0fSs66CwTQpUj0Of+USf wcA0zVuokF51Ir1SGzD8mO4FDyR2DavZoVb1BGa0E6GyZXDNQGm/39pa9AljtP7R3R0f Kj5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=AWqxMXxZyyIpuXXXkzQlPhMAdBnL5phZzxvQVSEP3oY=; fh=jiDQKWyS0lv/gWc15Ymc/xcPgU/VuRc+4Y0y3OSo5Mo=; b=UCgQM3jFwchuyLi5G26GosPnSDxcUvfZpMk779wslsTR/KrmJt40j8a882IBFMY9NV X76bqhOTpNyKqURh3lptj798xOv0gFD3XNoEKKYXEESSkaLi6RV2p7NRWwoea9k1hQC5 G6ojJ8Inz9bGvgkwYFtu7/DlrVF52Xl0iKHThecSb0D1oCl7I7g3TrlncW6ukob8/RuR XO0YGRc7ZUHKF9zm97uIvZmJw5XOEhgzKpyR7a/+3HQxqtSQ1ovEDIn5vntOXOobWvB7 d2q8clXTl1A9wlC/4OxkzicuVj9e2OKv2xxiT4X67kfDaqnkJUfZR5sz+OGpyRT8lkrB nKIw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=ZEVIAu2r; spf=pass (google.com: domain of fm-1324425-2024121605512073448f699e8d252012-_sizb0@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-2024121605512073448f699e8d252012-_SIZb0@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id d2e1a72fcca58-72918bbcc42si187984b3a.6.2024.12.15.21.51.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Dec 2024 21:51:22 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1324425-2024121605512073448f699e8d252012-_sizb0@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 2024121605512073448f699e8d252012 for ; Mon, 16 Dec 2024 06:51:20 +0100 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: cedric.hombourger@siemens.com, amikan@ilbers.de, srinuvasan Subject: [PATCH v1] rootfs: clean up the base-apt list conditionally in the image rootfs Date: Mon, 16 Dec 2024 11:29:17 +0530 Message-Id: <20241216055917.1284431-1-srinuvasan.a@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=ZEVIAu2r; spf=pass (google.com: domain of fm-1324425-2024121605512073448f699e8d252012-_sizb0@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-2024121605512073448f699e8d252012-_SIZb0@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: srinuvasan base-apt list is created under /etc/apt/sources.list.d only when we enable the ISAR_USE_CACHED_BASE_REPO as "1", otherwise, we use the bootstrap.list Presently the removal of base-apt.list is happening unconditionally, hence remove the base-apt list only when we use the local cached repo. isar-mmdebstrap generates the base-apt list with prefixes 0000 (0000base-apt.list) and isar-bootstrap generates the base-apt list with no prefixes (base-apt.list) handle the scenario to remove if any one of the list present under /etc/apt/sources.list.d Signed-off-by: srinuvasan --- meta/classes/rootfs.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index dd43fd4e..205da640 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -359,16 +359,16 @@ rootfs_cleanup_isar_apt() { set -e rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" + rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar" EOSUDO } -ROOTFS_POSTPROCESS_COMMAND += "rootfs_cleanup_base_apt" +ROOTFS_POSTPROCESS_COMMAND += "${@'rootfs_cleanup_base_apt' if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) else ''}" rootfs_cleanup_base_apt[weight] = "2" rootfs_cleanup_base_apt() { sudo -s <<'EOSUDO' set -e - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" - rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar" + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/*base-apt.list" EOSUDO }