-
Notifications
You must be signed in to change notification settings - Fork 6
Fix unversioned shebangs check false positives #32
Conversation
mcyprian
commented
Aug 8, 2017
- Prevent check failures in case the package requires /usr/bin/env, but doesn't contain any of the problematic shebangs, fixes Shebangs check reports false positives for packages requiring /usr/bin/env #31
- Add more log messages to the shebangs check to make debugging easier
hroncok
left a comment
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.
A few little nitpicks. Also, please use full URL of the issue in the commit message (in case we move to pagure or whatnot in the future).
Other than that, the fix itself looks OK. Thanks
| for shebang in FORBIDDEN_SHEBANGS: | ||
| if shebang_to_require(shebang) in package.require_names: | ||
| log.debug('Package {} requires {}'.format( | ||
| package.filename, shebang_to_require(shebang))) |
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.
Since the require is bytes, this will be weird on Python 3:
>>> 'Package {} requires {}'.format('foo', b'/usr/bin/env')
"Package foo requires b'/usr/bin/env'"| docutils = fixtures_factory('_docutils') | ||
|
|
||
| _nodejs = fixtures_factory('nodejs-semver-5.1.1-2.fc26') | ||
| nodejs = fixtures_factory('_nodejs') |
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.
Could you please add the new fixture to the first test, so all the downloading etc. happens at the beginning and all other tests happens at once?
bc9c63d to
d11e6fc
Compare
|
Thanks. Please autosquash and I'll approve and merge. |
Prevent check failures in case the package requires /usr/bin/env, but doesn't contain any of the problematic shebangs. Resolves fedora-python#31.
d11e6fc to
bdd7c87
Compare
|
Done. |
|
Merged to master. |