[Debian-med-packaging] Fixing perl location (Was: r9759 - trunk/packages/sift/trunk/debian/patches)

Andreas Tille andreas at an3as.eu
Thu Feb 23 14:54:30 UTC 2012


Hi,

in a recent commit I observed several patches of the form:

On Thu, Feb 23, 2012 at 12:42:33PM +0000, H. Soon Gweon wrote:
> Author: soonio-guest
> Date: 2012-02-23 12:42:33 +0000 (Thu, 23 Feb 2012)
> New Revision: 9759
> ...
>  -#!/usr/local/bin/perl
>  +#!/usr/bin/perl


While this is a perfectly possible approach to solve the problem of
fixing the Perl path it might end up redoing those patches for any new
upstream version (changed / new files etc.)  I'd regard this a boring
maintenance hell and thus I would rather try to do the following
(untestet!!!):
 

override_dh_install:
	dh_install
	egrep -rl "^#\!\s*/usr/local/bin/perl" debian | xargs -r --max-args 1 sed -i '1s%^#!\s*/usr/local/bin/perl%#!/usr/bin/perl%'


In short: If you have systematic patches to apply which do follow a
defined rule it is much more fun to implement this rule this way rather
than doing manual patches.  The same applies for adding the '-e' switch
to csh files which can be done in a similar way.

In any case you should always try to educate upstream that they could
fix this straight in their code ...

Kind regards

         Andreas.

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list