public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Claudius Heine <ch@denx.de>, Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH] isar-bootstrap-helper: Purge /var/lib/apt/lists on cleanup
Date: Mon, 3 Sep 2018 12:17:05 +0200	[thread overview]
Message-ID: <279d3431-fe77-18e9-a748-a0dec0271d57@siemens.com> (raw)

This saves dozens of MB on the target image. The user just needs to run
"apt-get update" to restore it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

The lowest hanging fruit for tinyfication. Base image on armhf, e.g., is
now ~100 MB.

Claudius, to my understanding, this will not break reproducibility as
--clean is only done on the final target image, not during the build,
not on the buildchroots.

 meta/classes/isar-bootstrap-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index d45cdd7..de056c1 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -136,6 +136,6 @@ setup_root_file_system() {
         sudo -E chroot "$ROOTFSDIR" \
             /usr/bin/apt-get clean
         sudo "$ROOTFSDIR/chroot-setup.sh" "cleanup" "$ROOTFSDIR"
-        sudo rm -f "$ROOTFSDIR/chroot-setup.sh"
+        sudo rm -rf "$ROOTFSDIR/chroot-setup.sh" "$ROOTFSDIR/var/lib/apt/lists/"*
     fi
 }
-- 
2.16.4

             reply	other threads:[~2018-09-03 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 10:17 Jan Kiszka [this message]
2018-09-04  8:56 ` Claudius Heine
2018-09-06 20:47 ` Maxim Yu. Osipov

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=279d3431-fe77-18e9-a748-a0dec0271d57@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=ch@denx.de \
    --cc=isar-users@googlegroups.com \
    /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