r53191 - /trunk/dh-make-perl/lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Mon Feb 22 10:19:23 UTC 2010
Author: dmn
Date: Mon Feb 22 10:18:59 2010
New Revision: 53191
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53191
Log:
drop_quilt: fix usage of undef var when removing upatch dependency
Modified:
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53191&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Mon Feb 22 10:18:59 2010
@@ -1414,11 +1414,17 @@
# remove unpatch dependency in clean
for( my $i = 1; $i < @rules; $i++ ) {
- if ( $rules[$i] eq ''
- and $rules[$i+1] eq 'override_dh_auto_clean: unpatch'
- and $rules[$i+2] eq "\tdh_auto_clean"
- and $rules[$i+3] eq '' ) {
- splice @rules, $i, 3;
+ if ( $rules[$i] eq 'override_dh_auto_clean: unpatch'
+ and $rules[ $i + 1 ] eq "\tdh_auto_clean"
+ and ( $i + 2 > $#rules or $rules[ $i + 2 ] !~ /^\t/ ) )
+ {
+ splice @rules, $i, 2;
+
+ # At this point there may be an extra empty line left.
+ # There may also be no empty line, if the clean override
+ # was at the end of the file
+ splice( @rules, $i, 1 )
+ if $#rules >= $i and $rules[$i] eq '';
last;
}
}
More information about the Pkg-perl-cvs-commits
mailing list