Skip to content

gh-74623: Avoid untar errors when write-protected files are tarred twice #103174

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

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

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented Apr 1, 2023

This is a manual rebase of gh-1808.

The original author commited using a email slightly different from the one the new CLA is signed with. So I squashed everything to add the expected e-mail as Co-authored-by.

Co-authored-by: Catherine Devlin <catherine.devlin@gmail.com>
@westurner
Copy link
Contributor

westurner commented Jan 16, 2025

I'm encountering what I believe is this issue with the build context tarfile passed to repo2podman from repo2docker, which has multiple copies of the same file in the archive (acccording to less archive.tar | grep '.git/objects' | sort -u | wc -l)

I can confirm that copying the tarfile.py from this PR into sys.path before python.zip results in successful tarfile.extractall()

Is there a good reason to not merge this PR?

https://devguide.python.org/core-developers/experts/index.html :

@westurner
Copy link
Contributor

I was getting PermissionError: [Errno 13] Permission denied:, which doesn't explain that it's due to ~ Counter()[filename] > 1

@westurner
Copy link
Contributor

@westurner
Copy link
Contributor

westurner commented Jan 16, 2025

How does tarfile.extractall() differ from tar -xzvf; before and after this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stdlib Python modules in the Lib dir topic-IO
3 participants