Fixed FUBERed shifting of the compared patches.
authorlace <>
Mon, 18 Dec 2006 22:01:43 +0000 (22:01 +0000)
committerlace <>
Mon, 18 Dec 2006 22:01:43 +0000 (22:01 +0000)
bin/checkspecpatch

index 994d058..e883f6c 100755 (executable)
@@ -19,12 +19,14 @@ for $ARGV (@ARGV) {
        my @applyno=sort { $a<=>$b; } ($file=~/^#+\s*%patch(\d+)\b/mig);
        my %applyno=map(($_=>1),@applyno);
        while (@source || @apply) {
-               my $source=(shift @source);
+               my $source=$source[0];
                $source=999999 if !defined $source;
-               my $apply =(shift @apply);
+               my $apply =$apply[0];
                $apply=999999 if !defined $apply;
-               next if $source eq $apply;
-               if ($apply < $source) {
+               if ($source eq $apply) {
+                       shift @apply;
+                       shift @source;
+               } elsif ($apply < $source) {
                        shift @apply;
                        warn "$ARGV: excessive: ".'%'."patch$apply\n";
                        $rc=1;