-
Notifications
You must be signed in to change notification settings - Fork 3k
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
untar_file: remove common leading directory before unpacking #12799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is it possible to create a functional test that fails the same way as the reported issue(s), so we can directly confirm that the fix works?
It should be possible, but I'm a bit lost in the codebase. What's a best way to add a functional test that builds a sdist and checks that it installs? In this case, test sdist contain hardlinks and symlinks. Not all OSes allow those on disk, but they should handle a tarball that contains them, so it might need to be built with |
I think you can add a pre-built tarfile to
Or yes, you could do it manually by building a sdist in a temporary directory using the tarfile module. It's a bit more obvious what's going on if you do that, but it's more work. |
I'll set up a Windows machine tomorrow to debug this. |
They look unrelated to this change, I've just hit "rerun" in case they are intermittent failures. |
Turns out it's because This became a bug in CPython after Windows started supporting symlinks. Fixing it there is not a high priority for me. Using |
Looks like there's still a CI failure to fix, and the branch needs to be brought up to date with main. |
f303024
to
54ddf75
Compare
54ddf75
to
4fd295e
Compare
untar_file: remove common leading directory before unpacking
Fixes: #12781
This should fix the issue with unpacking hardlinks in tarballs.