Package: eperl
Version: 2.2.14-12
Severity: normal

If a file that's going to be a script is processed with eperl like this:

        eperl -k -I $(eperl_pwd) -P -o script script.in

and script in starts like this:

,----
| #!/bin/sh -e
| # 
| # preinst maintainer script
| # $Id: preinst.in 1163 2006-04-03 19:02:45Z jdg $
| 
| #include variables
| <:[EMAIL PROTECTED]:>//
`----

Then the resulting script misses the shebang line (it starts with the
empty comment line).  This also happens without the -P switch.  

If a empty comment line is added as the first line, it is *not* gobbled,
leading to a nonfunctional script.  If a preprocessor comment is added
as the first line, like this:

,----
| #c
| #!/bin/sh -e
| # 
| # preinst maintainer script for the Debian <:=${PACKAGE}:> package.
| # $Id: preinst.in 1163 2006-04-03 19:02:45Z jdg $
| 
| #include variables
| <:[EMAIL PROTECTED]:>//
`----

then the file starts with an empty line (i.e. the preprocessor comment
does not discard the newline character, as advertised in the manpage:

,----
|       "#c"
|            This is the comment directive which just discards all data
|            up to and including the newline character. Use this one to
|            comment out any stuff, even other preprocessor directives.
`----

So the only way to get a working script seems to be to move the #include
stuff to the first line - no empty line is generated:

,----
| #include variables
| #!/bin/sh -e
| # 
| # preinst maintainer script for the Debian <:=${PACKAGE}:> package.
| # $Id: preinst.in 1168 2006-04-04 17:04:28Z frank $
| 
| <:[EMAIL PROTECTED]:>//
`----

Regards, Frank

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (99, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.15-1-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages eperl depends on:
ii  libc6                      2.3.2.ds1-22  GNU C Library: Shared libraries an
ii  libperl5.8                 5.8.4-8sarge3 Shared Perl library
ii  perl                       5.8.4-8sarge3 Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.4]  5.8.4-8sarge3 The Pathologically Eclectic Rubbis

-- no debconf information

-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)


Reply via email to