From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: Uladzimir Bely <ubely@ilbers.de>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH 2/2] Clean apt cache from debootstrapped rootfs dirs
Date: Fri, 30 Dec 2022 10:03:30 +0100 [thread overview]
Message-ID: <CAJGKYO7OzcvX0FRR4bHVAE7kFGu-BpxOUBmWkEjUMvHW8bj0uA@mail.gmail.com> (raw)
In-Reply-To: <20221230043858.15411-3-ubely@ilbers.de>
On Fri, 30 Dec 2022 at 05:39, Uladzimir Bely <ubely@ilbers.de> wrote:
>
> 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 <ubely@ilbers.de>
> ---
> meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> index b9ae16cd..b7619262 100644
> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> @@ -408,6 +408,12 @@ do_bootstrap() {
> ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}"
> EOSUDO
> deb_dl_dir_export "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}"
> +
> + # Cleanup apt cache
> + sudo -E -s <<'EOSUDO'
> + set -e
> + chroot "${ROOTFSDIR}" /usr/bin/apt-get -y clean
> +EOSUDO
> }
>
Hi Uladzmir, I have implemented this one as following
sudo -Es chroot "${ROOTFSDIR}" /usr/bin/apt-get -y clean
and in my case save the disk size equal to build/dowloads/deb
Best regards, R-
next prev parent reply other threads:[~2022-12-30 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 4:38 [PATCH 0/2] Improving apt cache Uladzimir Bely
2022-12-30 4:38 ` [PATCH 1/2] Use hardlinks in deb-dl-dir functions Uladzimir Bely
2022-12-30 7:29 ` Moessbauer, Felix
2022-12-30 8:29 ` Roberto A. Foglietta
2022-12-30 4:38 ` [PATCH 2/2] Clean apt cache from debootstrapped rootfs dirs Uladzimir Bely
2022-12-30 9:03 ` Roberto A. Foglietta [this message]
2023-01-02 16:27 ` Henning Schild
2023-01-02 16:33 ` Henning Schild
2023-01-03 9:01 ` Roberto A. Foglietta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJGKYO7OzcvX0FRR4bHVAE7kFGu-BpxOUBmWkEjUMvHW8bj0uA@mail.gmail.com \
--to=roberto.foglietta@gmail.com \
--cc=isar-users@googlegroups.com \
--cc=ubely@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox