| Summary: | python-single-r1: python_fix_shebang shouldn't (always?) fail on incompatible shebangs | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Christoph Mende (RETIRED) <angelos> |
| Component: | Eclasses | Assignee: | Python Gentoo Team <python> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Christoph Mende (RETIRED)
2014-03-22 14:55:20 UTC
Why would upstream use 'python3' shebang on script that works in Python 2? The check is there to avoid mistakes. No idea, I'd guess because they prefer python3 or come from a platform where there's only python2 and python3, not python. At least that's the case for pastebinit-1.4.1 where I had to use the sed workaround. Like I said, avoiding mistakes is the only reason I found, but I don't think letting a script die is a good way to hint at possible mistakes when there's perfectly valid scenarios. Another possible solution to this would be a --force parameter or something like that. That would make the developer writing the ebuild think twice about what he's doing and still give him the chance to use python_fix_shebang. + 19 Jun 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass, + python-utils-r1.eclass, tests/python-utils-r1.sh: + Improve handling of corner cases in python_fix_shebang. Support --force and + --quiet options, bug #505354. Add tests. |