Hi all,

Recently, we added a new QA check in Gentoo Prefix' Portage to check
shebangs (the #! things) of scripts before they are installed.  We
basically did this simply because we don't want to use say
/usr/bin/perl and because this executable might not exist (e.g. on
vanilla FreeBSD).  Even if it does exist, we still don't want to use it,
since we installed a newer/better version, that also can find the
installed packages.  This basically does not affect Gentoo Linux,
however, we do run into several other cases right now that do affect
Gentoo Linux:

- shebangs like #!python, these are invalid and used by some python
  packages
- shebangs like #!/usr/local/bin/python, this is not a good idea, used
  IIRC by python itself
- shebangs like #!/bin/csh or #!/bin/tcsh that are correct in itself,
  but basically need tcsh to be installed to run, e.g. vim does this

The problem with these is that they are executable scripts, e.g. a user
could expect them to be able to run, IMO.  Solving this can be done by
fixing the shebang (as for the first two cases), adding a runtime
dependency (for the last case), or by removing the executable bit of the
scripts so they no longer can be run, and they merely become
examples/documentation.

Should we start filing bugs on these issues?  In the end, they are
broken scripts on the system.  Is there interest for porting the Prefix
shebang QA check to normal Portage?


-- 
Fabian Groffen
Gentoo on a different level

Reply via email to