r14761 - in /trunk/libterm-readline-gnu-perl: ./ Gnu/ debian/ debian/patches/

Niko Tyni ntyni at debian.org
Tue Feb 12 18:13:27 UTC 2008


On Tue, Feb 12, 2008 at 12:24:15PM -0200, Martín Ferrari wrote:
 
> While you're right that build time fixing is more robust, it felt to
> me like a non-very-nice hack; and it is not like there are many
> non-example scripts in the distribution (zero). I kept the change on
> Gnu.pm, but it is a no-op, since the pm is not meant for direct
> execution.
> 
> Also, it wasn't checking that the changed line was the first on the
> script, so some day it could break something (low probability, I
> know). I wouldn't have done that change alone, but as the whole rules
> was somewhat "hand-made", complicated, and had many make errors wrt
> dependencies, I wanted to make it dead simple.
 
Thanks, I was just wondering if there was some compelling reason I hadn't
thought of.

This reminded me of a similar case of .diff.gz patching in soap-lite that
I once converted to a sed hack because of bitrot (#345318). Only now
that I look at it, the old version also renamed the scripts by adding
new copies in .diff.gz, so it was much more obvious they were going to
get out-of-date.

Anyway, this is what I came up with. I see it does modify the shebang
only on the first line :)

 # remove the .pl from script names and fix their shebang lines
 SCRIPTS=bin/SOAPsh bin/XMLRPCsh bin/stubmaker

 fix-scripts: fix-scripts-stamp
 fix-scripts-stamp: $(SCRIPTS)
   touch $@
   
 bin/%: bin/%.pl
    echo '#!/usr/bin/perl' > $@
    # fix the script names inside them too
    sed '1d; s,$(notdir $@)\.pl,$(notdir $@),g' < $< >> $@

> If you feel that my change is wrong, I don't mind reverting it...

Oh no, I don't think there's right or wrong here, as long as it works.
Just a matter of taste.

Thanks again,
-- 
Niko



More information about the pkg-perl-maintainers mailing list