Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Conversation

@mcyprian
Copy link
Member

@mcyprian mcyprian commented Aug 8, 2017

Copy link
Member

@hroncok hroncok left a 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)))
Copy link
Member

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')
Copy link
Member

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?

@mcyprian mcyprian force-pushed the unversioned_shebangs branch from bc9c63d to d11e6fc Compare August 9, 2017 08:50
@hroncok
Copy link
Member

hroncok commented Aug 9, 2017

Thanks. Please autosquash and I'll approve and merge.

Michal Cyprian added 2 commits August 9, 2017 11:51
Prevent check failures in case the package requires /usr/bin/env,
but doesn't contain any of the problematic shebangs.

Resolves fedora-python#31.
@mcyprian mcyprian force-pushed the unversioned_shebangs branch from d11e6fc to bdd7c87 Compare August 9, 2017 09:52
@mcyprian
Copy link
Member Author

mcyprian commented Aug 9, 2017

Done.

@hroncok hroncok merged commit bdd7c87 into fedora-python:develop Aug 9, 2017
@hroncok
Copy link
Member

hroncok commented Aug 25, 2017

Merged to master.

@mcyprian mcyprian deleted the unversioned_shebangs branch August 25, 2017 08:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shebangs check reports false positives for packages requiring /usr/bin/env

2 participants