From e95ad81c4756b233dac68d9e809d3ffd25d9ae93 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Apr 2019 11:31:26 +0200 Subject: [PATCH] Run clean_debian_chroot after minimize_manual This avoids us having apt cache files in the final image. For auto/build, we move the call to clean_debian_chroot to the end, this also takes care of the caches generated by apt-get update in case of a preinstalled-pool. For layered, it's just a simple swap of the lines. LP: #1826377 --- debian/changelog | 6 ++++++ live-build/auto/build | 4 ++-- live-build/lb_chroot_layered | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 16ba25d8..0f5a445c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.579) UNRELEASED; urgency=medium + + * Run clean_debian_chroot after minimize_manual (LP: #1826377) + + -- Julian Andres Klode Thu, 25 Apr 2019 11:43:11 +0200 + livecd-rootfs (2.578) disco; urgency=medium * Fix the sed script that Tobias had right in the first place and I diff --git a/live-build/auto/build b/live-build/auto/build index 22981da5..8238b8bb 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -308,8 +308,6 @@ EOF apt-get -y --purge autoremove" fi - clean_debian_chroot - if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then # Save even more size by removing apt lists (that are currently removed # downstream anyway) @@ -427,6 +425,8 @@ EOF echo END docdirs /usr/share/livecd-rootfs/minimize-manual chroot + + clean_debian_chroot fi if [ -n "${PASSES}" ]; then diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 113c7e30..61ce9438 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -244,8 +244,8 @@ create_chroot_pass () { lb chroot_interactive ${*} # Misc ubuntu cleanup and post-layer configuration - clean_debian_chroot /usr/share/livecd-rootfs/minimize-manual chroot + clean_debian_chroot Chroot chroot "dpkg-query -W" > chroot.packages.${pass}