BuildSourceImage icon indicating copy to clipboard operation
BuildSourceImage copied to clipboard

Use extra-src archive checksum in filename

Open tkdchen opened this issue 1 year ago • 0 comments

This PR proposes a new extra-src file name form.

There is a use case for source container images with extra sources. That is, after deduplicating sources between two images then merge them, same extra source tar archive names remain potentially.

For instance, image A has extra-src-[012].tar archive per layer and image B has extra-src-[01].tar archive per layer. When extra-src-1.tar of image B duplicates the extra-src-2.tar of image A and is removed, then after merging these two images, the final source image will have two layers including extra-src-0.tar.

As a result, if users extract the sources sequentially, previous extra-src-*.tar file may be overwritten.

This patch replaces the counter with checksum computed from the extra source archive to avoid such potential duplicate. It is convenient for manipulate sources by image layers directly without the need of adjusting the counter.

tkdchen avatar Apr 24 '24 08:04 tkdchen