Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extra-src archive checksum in filename #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tkdchen
Copy link
Contributor

@tkdchen tkdchen commented Apr 24, 2024

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.

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.

Signed-off-by: Chenxiong Qi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant