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

feat: update flatten to deduplicate files #131

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

westrik
Copy link
Contributor

@westrik westrik commented Dec 9, 2024

#119 added a deduplicate option to flatten to address "duplicates of file paths not supported" errors when loading flattened images with Docker.

This option deduplicates directories, but in its current implementation it does not deduplicate files. This means the duplicate file path errors can still occur in some cases.

This change updates flatten.sh to deduplicate files as well, with the final file in the archive being preserved for each path.

It also renames assert_tar_listing to assert_tar_mtree and creates a new assert_tar_listing rule that lists archive contents instead of exporting an mtree.

As currently implemented, this option does not deduplicate files, which means the duplicate file path errors can still occur in some cases.

This change updates `flatten.sh` to deduplicate files as well, with the final file in the archive being preserved for each path.

It also renames `assert_tar_listing` to `assert_tar_mtree` and creates a new `assert_tar_listing` rule that lists archive contents instead of exporting an mtree.
@westrik westrik force-pushed the flatten_deduplicate_files branch from 3275814 to 0b84ccc Compare December 9, 2024 23:14
@thesayyn thesayyn merged commit bb3c444 into GoogleContainerTools:main Dec 10, 2024
10 checks passed
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.

2 participants