Re: perl scripts and lintian warnings
On Sun, 11 Apr 1999, Ossama Othman wrote:
> I get the following warning from lintian on my libace4.6-doc package:
>
> W: libace4.6-doc: executable-not-elf-or-script usr/doc/libace4.6-doc/examples/tutorials/colorize
>
> This apparently occurs since this perl script (and others) starts with
> the following:
>
> eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
> & eval 'exec perl -S $0 $argv:q'
> if 0;
Mmm, maybe this is the reason why fakeroot gives strange message errors
when texi2html is run from it?
> All of the perl scripts start with this since a Perl book suggests
> starting perl scripts with the above since it allows you to run the
> script without explicitly stating where perl is located in the path.
Since, by policy, Debian perl is always in /usr/bin, the trick is not
needed in Debian.
> Since this is actually suggested in a book, it seems reasonable that
> many other perl scripts start this way, hence causing lintian to give
> warnings.
>
> Should I edit all the scripts (*ugh*) to use the standard
> "#!/usr/bin/perl" or should lintian's lab be updated? I assume the
> former should be done since the existing perl scripts don't conform to
> Debian policy, right?
It seems not:
4.4 Scripts
All command scripts, including the package maintainer scripts inside
the package and used by dpkg, should have a #! line naming the shell
to be used to interpret them.
In the case of Perl scripts this should be #!/usr/bin/perl.
IMHO, since the script does not have a #! line, lintian does the right
thing here.
Thanks.
--
"45980480ba1b507c1af9a20bb8c56465" (a truly random sig)
Reply to: