Bug 461483 - E: non-executable-script in site-packages
Summary: E: non-executable-script in site-packages
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: 8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-08 14:12 UTC by Ignacio Vazquez-Abrams
Modified: 2009-02-24 04:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-09 15:57:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ignacio Vazquez-Abrams 2008-09-08 14:12:22 UTC
Description of problem:
rpmlint flags non-executable Python files with a shebang under site-packages as an error.

Version-Release number of selected component (if applicable):
rpmlint-(none):0.83-1.fc8.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Build a package that puts a non-executable file with a shebang in site-packages.
2. Run rpmlint on it.
  
Actual results:
package.arch: E: non-executable-script /usr/lib/pythonX.Y/site-packages/file.py 0644

Expected results:
No output

Additional info:

Comment 1 Ville Skyttä 2008-09-08 21:07:47 UTC
$ rpmlint -I non-executable-script
non-executable-script:
This text file contains a shebang or is located in a path dedicated for
executables, but lacks the executable bits and cannot thus be executed.  If
the file is meant to be an executable script, add the executable bits,
otherwise remove the shebang or move the file elsewhere.

So, in a sense, not a bug.  On the other hand, rpmlint already makes a (disputed) exception for *.pm perl modules and ignores the shebang in them.

What's the use case of putting a shebang in a *.py installed in python lib dirs which is not executed using the shebang (because the file is not executable)?  Do some python command line options present in the shebang line take effect for the file even when the file is loaded as a library or something?

Comment 2 Ignacio Vazquez-Abrams 2008-09-09 00:09:10 UTC
(In reply to comment #1)
> What's the use case of putting a shebang in a *.py installed in python lib dirs
> which is not executed using the shebang (because the file is not executable)? 

There isn't one. Nonetheless, lots of people put it there by sheer force of habit, and having to add a sed command to the spec in order to strip it is... less than amusing.

Comment 3 Ville Skyttä 2008-09-09 15:57:53 UTC
In that case, not a bug: if there's no advantage in putting the shebang in, the only thing it does is potentially confuse people and thus the files would be better off without it.

If sed'ing them out is annoying, another approach could be just to ignore the rpmlint output about this for the moment and ask upstream to take the shebang out, that'd eventually trickle down to the packaged version.

Comment 4 David Aguilar 2009-02-24 04:58:54 UTC
Thanks for the bug report everyone.
I've fixed cola's sources to no longer contain the shebang lines so that this will no longer be a problem in the future.


Note You need to log in before you can comment on or make changes to this bug.