From: Wayne Davison Date: Sat, 28 Oct 2006 21:06:21 +0000 (+0000) Subject: - Put the config.cache file in the parent dir of the workdir so that X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/999cb289d3824d7821ff0fcdc100ca6622c01fdf?ds=sidebyside - Put the config.cache file in the parent dir of the workdir so that it can be reused across patches. - Added a "patches" symlink so that the patches/tmp dir can be moved do a different disk, replaced by a symlink, and the the tmp dir can still find the place where the patch files live. --- diff --git a/verify-patches b/verify-patches index 77b15ad..1185bf4 100755 --- a/verify-patches +++ b/verify-patches @@ -33,7 +33,7 @@ EOT $ENV{'LC_COLLATE'} = 'C'; $| = 1; -my $CONF_OPTS = '-C'; +my $CONF_OPTS = '--cache-file=../config.cache'; my($has_dependencies, @new, @rejects); @@ -49,6 +49,7 @@ close IN; mkdir('tmp', 0777) unless -d 'tmp'; chdir('tmp') or die "Unable to chdir to 'tmp'"; +symlink('..', 'patches') unless -d 'patches'; mkdir('workdir') unless -d 'workdir'; open(OUT, '>exclude') or die $!; @@ -60,7 +61,7 @@ unless ($no_cvs) { system qq|cvs -qd "$root" co -P -d cvsdir rsync|; } -@ARGV = glob('../*.diff') unless @ARGV; +@ARGV = glob('patches/*.diff') unless @ARGV; DIFF: foreach my $diff (@ARGV) { @@ -69,14 +70,14 @@ foreach my $diff (@ARGV) { $diff =~ s#^(patches|\.\.)/##; my $conf_opts; - open(IN, "../$diff") or die $!; + open(IN, "patches/$diff") or die $!; while () { last if /^--- /; if (/^Depends-On-Patch: (\S+.diff)$/) { my $dep = $1; $has_dependencies = 1; print "\nApplying dependency patch $dep...\n"; - if (system("patch -d cvsdir -p1 -b -Vt <../$dep") != 0) { + if (system("patch -d cvsdir -p1 -b -Vt ) { print $_; chomp; @@ -240,7 +241,7 @@ sub generate_new_patch foreach (@new) { system "touch -r workdir/$_ cvsdir/$_"; } - open(IN, "../$diff") or die $!; + open(IN, "patches/$diff") or die $!; open(OUT, '>new.patch') or die $!; while () { last if /^--- /; @@ -260,7 +261,7 @@ sub generate_new_patch unlink("cvsdir/$_"); } print "\nDiffing... "; - if (system("diff ../$diff new.patch >/dev/null") == 0) { + if (system("diff patches/$diff new.patch >/dev/null") == 0) { print "new patch is identical to old.\n"; return 'N'; }