From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7190633692108161024 X-Received: by 2002:a05:6a00:162a:b0:58d:974c:c404 with SMTP id e10-20020a056a00162a00b0058d974cc404mr1676446pfc.73.1674199870179; Thu, 19 Jan 2023 23:31:10 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:6b44:b0:194:6afa:c3 with SMTP id g4-20020a1709026b4400b001946afa00c3ls4605001plt.4.-pod-prod-gmail; Thu, 19 Jan 2023 23:31:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZP6yICKvyYJYudcJcg4L3XYYfDNHqU4PH18l8ky9bp8QB0zrdcTQBQJ5AQRHu6A1R3o+R X-Received: by 2002:a17:90a:f593:b0:226:2124:ef67 with SMTP id ct19-20020a17090af59300b002262124ef67mr14642714pjb.38.1674199869231; Thu, 19 Jan 2023 23:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674199869; cv=none; d=google.com; s=arc-20160816; b=zqs++SzYQwydDMzo3d1YeF1ySkebMhOKbxvOmoQuChDVAqIYV3WRPBFqwVCZt6EyOY MkrbR+A5stG/QbEewnBUI1ovcAoCwHv5IRRJgYfWOsZRwDRxyLZzm0OcChUXtqEJ7v5J B/BWqQjl3uETxE2kvl8jaoCLhZK+uS5PMk1xapVDnshSbSeuCEn413OKnTXeZo8T2D6i 7M8mfieMH9NmzZWjZb4ypSFgh/TnMpRmTETk6vX2o3inmsV8TPbUVB87ELiYuuO/Oi2c xAtXw56CsS+kAT15WDdNscOcmuHkZCnWXM8URY5kyLd2Y2pu897PEholaRh6h65oVK5l BqiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=G0Xxf6ShPmMfLkYg8XAaushJ0SJ7JjBTQwo7NgLL4tA=; b=kJhGBkYz2tVBYGjC4Fy7+ufh5WPBDdD5kUB5M92u4/7zyla8lcwWz2uXM6uTYcCZMW a02psiNuCA/Chl0V4w0lMEyA3HWG0q3uu6gWm9cGuYF4Le8EMI9kPLE1Ia7d/5YTNiVi oTIE9GWckHx1LVKmr9n6YK3FaaEX7mJEorvMo/KrPnmqSmYQa1+SEkDKlzA134XV/zr3 hEc4T86Hw1Hf5LXarLRktBVEDU/FXPP9lN8QCNGHWWMLHebz6u9v7HEbaudEeM7P6kOH 6/oH8PAcNXfENLAzMAsGXSporHq/ydGFYStEnya0me1oGffeJo46NYDD37N4UVV2vlT7 Dbnw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id s1-20020a17090a13c100b00212bf9345fasi127496pjf.2.2023.01.19.23.31.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 23:31:09 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 30K7V6DQ001626 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 20 Jan 2023 08:31:07 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3 1/5] Clean apt cache from debootstrapped rootfs dirs Date: Fri, 20 Jan 2023 08:31:02 +0100 Message-Id: <20230120073106.5453-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230120073106.5453-1-ubely@ilbers.de> References: <20230120073106.5453-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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-TUID: uIRP6K0mLJzk This cleans `/var/cache/apt/archives` contents from debootstrapped rootfs directories after exporting their contents to download directory. This reduces disk usage by both files and sstate caches. Signed-off-by: Uladzimir Bely --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index faba73fe..cb0079ec 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -392,6 +392,9 @@ do_bootstrap() { ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}" EOSUDO deb_dl_dir_export "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" + + # Cleanup apt cache + sudo -Es chroot "${ROOTFSDIR}" /usr/bin/apt-get -y clean } addtask bootstrap before do_build after do_generate_keyrings -- 2.20.1