Bug#636440: live-build: apt-file cache needs to be regenerated at end of chroot stage. Add some extra cleaning.
Package: live-build
Version: 3.0~a25
Severity: wishlist
Tags: upstream, patch
At the end of chroot stage, script should update apt-file cache with
repositories that will be used in final live system. This only applies
if apt-file is installed. I am attaching proposed patch.
Also, when there are multiple kernels, there remain /vmlinuz.old
and /initrd.img.old on chroot, so I attach another proposed patch to
clean those files.
--- live-build-3.0~a25/scripts/build/lb_chroot_archives.orig 2011-08-03 03:01:22.000000000 +0200
+++ live-build-3.0~a25/scripts/build/lb_chroot_archives 2011-08-03 03:03:39.000000000 +0200
@@ -797,6 +797,12 @@
rm -rf chroot/var/cache/apt
mkdir -p chroot/var/cache/apt/archives/partial
+ # This one may look ugly, but we need to rebuild apt-file cache with final repositories in place.
+ if [ "${LB_APT_INDICES}" ! = "false" ] && [ -x chroot/usr/bin/apt-file ]
+ then
+ Chroot chroot "apt-file update"
+ fi
+
# Cleaning apt package lists
if [ "${LB_APT_INDICES}" = "false" ]
then
--- live-build-3.0~a25/scripts/build/lb_chroot_hacks.orig 2011-08-03 03:01:22.000000000 +0200
+++ live-build-3.0~a25/scripts/build/lb_chroot_hacks 2011-08-03 03:04:19.000000000 +0200
@@ -225,6 +225,8 @@
rm -f chroot/var/cache/debconf/*-old
rm -f chroot/var/lib/dpkg/*-old
rm -f chroot/var/log/apt/term.log
+rm -f chroot/initrd.img.old
+rm -f chroot/vmlinuz.old
if [ -n "${LB_ROOT_COMMAND}" ]
then
Reply to: