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

Bug#778317: live-build: bootstrap cache should be per-architecture



On 13/02/2015 14:21, Michal Suchanek wrote:
> When you change the live architecture and don't delete the cache
> directory bootstrap of the old architecture is restored from cache and
> image of the old architecture is built.
>
> This is trivially solved by including the architecture name in the
> bootstrap cache folder name. Package cache may be shared and some
> packages may be even reused on multiple architectures once the bootstrap
> is correct.

This issue is already known about (at least to me, and it's been
encountered and discussed in the mailing list), and I have had it in a
mental todo list to consider writing such a patch as you describe, but I
had not yet gotten around to even writing a bug report, so thanks for
making one.

I am not totally convinced yet whether it is better for users to simply
use a separate build directory for each architecture.

There are two issues this would help address:
1) Users can easily switch architecture in their config and then
unknowingly run into issues upon rebuilding.
2) For users building multiple images for different architectures, while
you could just use a separate build directory for each, this would allow
using the same build directory if desired, without having to throw away
or rename the existing cached bootstrap, things would just work
automatically.

In addition to the bootstrap cache however, there are also other cached
items to consider:
1) Optional caching of the rootfs image. This would also require the
arch being added to the name.
2) Stuff like dist info files (Contents.gz, etc) and d-i. The d-i files
are already impervious to issues here due to the way they are named. I'm
not certain about the others, though they certainly will be once my bug
#718225 (secure wget downloads) patches get adopted, which includes some
improvements in the caching area, so no point investigating on the
assumption that that work will be adopted soon.


Reply to: