-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out #77066
Comments
We (Fedora's Python SIG) would like to promote usage of Tools/scripts/pathfix.py (we've even moved it to $PATH) in Fedora RPM build (a.k.a spec files) instead of various error prone finds + greps + seds. However when running pathfix.py, it creates backup files (with ~ suffix). This is mostly unfortunate in RPM build environment, because one needs to clean those up, otherwise one gets warnings and errors like this: error: Installed (but unpackaged) file(s) found: Or the file with ~ might even get installed if a more relaxed patter is used in a %files section that lists what is part of the RPM package.
We even have shebangs checks/mangling in place and the ~ suffixed file still has the wrong shebang, resulting in warnings like this: *** WARNING: mangling shebang in /usr/bin/spam~ from #!/usr/bin/python -Es to #!/usr/bin/python2 -Es. This will become an ERROR, fix it manually! Steps to Reproduce:
Actual results: omg omg~ Expected results: omg Since the backup feature was here for ages, instead of changing the behavior, I suggest a flag is added that disables this. 2to3 has exactly the proposed flag as: "-n, --nobackups Don't write backups for modified files". This doesn't necessarily need to go into all versions, but I've selected all that has this problem. Getting it to 3.6+ would be great, however if it goes to anything later, we'll backport it in the Fedora package. I have a patch ready, sill send PR. |
It's technically a new feature. But since it's just in Tools/, we could make an exception. I've removed the security branches from versions. |
New changeset 5affd5c by Christian Heimes (Miro Hrončok) in branch 'master': |
This seems complete, can it be closed? |
Please change status to closed as well. Thanks. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: