[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Re: live-build: LB_APT_INDICES="false" does not remove indices



Ah, thanks Punky & Anthony for the output, that helps a lot, it prompted
me to notice that I was mistaken in my previous assertion of those other
files I listed being located in /var/lib/apt, I don't know why on earth
I got that into my head.

The real location of those other files are:
chroot/etc/apt/secring.gpg*
chroot/etc/apt/trusted.gpg*
chroot/var/cache/apt/pkgcache.bin
chroot/var/cache/apt/srcpkgcache.bin
chroot/var/lib/apt/lists/*_Packages
chroot/var/lib/apt/lists/*_Sources
chroot/var/lib/apt/lists/*Release*

Having noticed that I had the directory structure of these wrong In my
head, I'm more confident that the original solution I put forth is
perfectly adequate to address the problem.

So, all you need to do to get the --apt-indices param honored is to
disable that IF statement I previously mentioned (lines 550-558 of
chroot_archives on the updated debian-next branch as of this moment).
With that gone, the process will take a little bit longer, but it won't
break anything, and you'll get the results that you're after punky.

With the early-exit IF statement disabled, it will no longer block the
necessary cleanup code. The *bin cache files above will be deleted by
lines 766-767, and the var/lib/apt/lists files will be deleted by lines
770-774.

The gpg files will remain in place, as I'm confident that they should.

To be clear, since I haven't attached a patch, the following is the IF
statement in chroot_archives which needs commenting out:

        # Configure generic indices
        # Don't do anything if it's not required
        if [ "${LB_PARENT_MIRROR_CHROOT}" = "${LB_PARENT_MIRROR_BINARY}"
] && \
        [ "${LB_PARENT_MIRROR_CHROOT_SECURITY}" =
"${LB_PARENT_MIRROR_BINARY_SECURITY}" ] && \
        [ ! -d chroot/root/packages ]
        then
            # Removing stage file
            rm -f .build/chroot_archives

            exit 0
        fi


Reply to: