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

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

Closed
wants to merge 11 commits into from

Conversation

catherinedevlin
Copy link
Contributor

@catherinedevlin catherinedevlin commented May 25, 2017

Test to demonstrate the problem described in bug 30438, and proposed fix.

Formerly, setting permissions was only delayed for directories,
not files.  However, if an archive contains multiple copies of
a file without write permissions, setting its permission must
also be delayed, or a confusing Permission Denied error will be
thrown.

See issue 30438 in the Python bug tracker.
@serhiy-storchaka serhiy-storchaka self-requested a review May 25, 2017 10:12
@brettcannon
Copy link
Member

@catherinedevlin there's other changes to tarfile.py. Is that also part of the test or accidental inclusion?

@catherinedevlin
Copy link
Contributor Author

catherinedevlin commented May 25, 2017

Ah, the latest commit includes a fix for the issue, but I forgot to describe it. I just edited the PR description. More here: http://bugs.python.org/issue30438#msg294440

@brettcannon
Copy link
Member

@catherinedevlin could you also update the title of the PR itself to describe what it's for?

@catherinedevlin catherinedevlin changed the title bpo-30438 - skipped test demonstrating bug bpo-30438 - Avoid untar errors when write-protected files are tarred twice May 30, 2017
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Feb 19, 2022
@MaxwellDupre
Copy link
Contributor

Tests ok but the line

"Issue 30438: tarring a readonly file twice, then extracting, should succeed"

Appears in test results, please remove or make just simple comment.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Mar 16, 2022
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 15, 2022
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Jul 28, 2022
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Aug 28, 2022
@arhadthedev arhadthedev changed the title bpo-30438 - Avoid untar errors when write-protected files are tarred twice gh-74623: Avoid untar errors when write-protected files are tarred twice Feb 4, 2023
@arhadthedev arhadthedev added the stdlib Python modules in the Lib dir label Feb 4, 2023
@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Feb 4, 2023

The following commit authors need to sign the Contributor License Agreement:

Click the button to sign:
CLA not signed

@arhadthedev
Copy link
Member

@catherinedevlin Could you sign the new CLA by clicking not signed button in the cpython-cla-bot's message, please?

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 5, 2023
@terryjreedy
Copy link
Member

The Ubuntu/pipelines/sanitizer failures are due to 'environment changed'. Do TEMPDIR files need some sort of manual cleanup?

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Mar 30, 2023
@ethanfurman ethanfurman removed the stale Stale PR or inactive for long period of time. label Mar 30, 2023
@arhadthedev
Copy link
Member

I'll look into the tests this weekend since the author seems to be missing for a while.

@arhadthedev
Copy link
Member

@terryjreedy The tests are passing now.

To fix the CLA issue, I squashed this PR into gh-103174.

@terryjreedy
Copy link
Member

Closing since cannot merge due to unfixable CLA issue.

Note: Not using linux, I know nothing about tarfile.

@terryjreedy terryjreedy closed this Apr 1, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants