pytorch / pytorch/vision

Relocate script does not copy file mode information

Open
#7,101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

The copyfile call that happens here
https://github.com/pytorch/vision/blob/93df9a50885d0345e31bba691576c83d5cee7737/packaging/wheel/relocate.py#L203
only copies the file contents and not the metadata like the permissions. This causes issues when deploying these copied wheels.

What is needed is an additional call to copymode to copy over the permission bits

Versions

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open packaging/wheel/relocate.py at the copyfile call around line 203 and inspect how the relocated wheel files are copied. Verify that the resulting copy preserves the source file's permission bits, then check the affected wheel deployment behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.