X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/a68c3b2e13a76a42ccd938d8c23995b610ad01b5..648eb961858d1f108dc6fedfc82c869763bc8d65:/verify-patches diff --git a/verify-patches b/verify-patches index 6c77581..67698cd 100755 --- a/verify-patches +++ b/verify-patches @@ -2,6 +2,7 @@ use strict; use Getopt::Long; +use Cwd; my @generated_files = qw( proto.h configure config.h.in rsync.1 rsyncd.conf.5 ); @@ -31,6 +32,8 @@ from inside the patches subdir. EOT } +my $patches_dir = Cwd::cwd(); + $ENV{'LC_COLLATE'} = 'C'; $| = 1; my $CONF_OPTS = '--cache-file=../config.cache'; @@ -51,7 +54,8 @@ close IN; mkdir('tmp', 0777) unless -d 'tmp'; chdir('tmp') or die "Unable to chdir to 'tmp'"; -symlink('..', 'patches') unless -d 'patches'; +unlink('patches'); +symlink($patches_dir, 'patches'); symlink($$, 'lock') or die "Unable to create lock file: $!\n"; @@ -90,7 +94,7 @@ foreach my $diff (@ARGV) { my $dep = $1; $has_dependencies = 1; print "\nApplying dependency patch $dep...\n"; - if (system("patch -d cvsdir -p1 -b -Vt ) { print $_; chomp; @@ -222,6 +226,8 @@ sub apply_patch push(@new, $_) unless -f "cvsdir/$_"; } elsif (s/.* saving rejects to file //) { push(@rejects, $_); + } elsif (/No file to patch\.\s+Skipping patch/) { + push(@rejects, 'skipped.file'); } elsif (/^Hunk #\d+ succeeded at \d+( with fuzz $interesting_fuzz)?/o) { $saw_fuzz ||= defined $1; $saw_offset = 1;