diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-06-29 16:51:08 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-06-29 17:08:26 -0700 |
commit | b3eb40f9c9919e5c40762cab1196715bd8796af1 (patch) | |
tree | 109c4fabed3bc5800d05406aa7d1d4101ef03623 /bin | |
parent | a1d8293f3bfa2516f9a0424e3a6e63c2f8e93c6e (diff) | |
download | autoconf-b3eb40f9c9919e5c40762cab1196715bd8796af1.tar.gz |
Save and check Autom4te version in cache
Problem reported in <https://bugs.debian.org/219621>.
* bin/autom4te.in: Save and check autom4te version number into cache index.
* lib/Autom4te/C4che.pm (save): New arg $version. All callers changed.
(good_version): New sub.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/autom4te.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/autom4te.in b/bin/autom4te.in index bcf0d498..4e2af77e 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -996,7 +996,8 @@ $icache_file->lock (LOCK_EX) # If autom4te is younger, then some structures such as C4che might # have changed, which would corrupt its processing. Autom4te::C4che->load ($icache_file) - if -f $icache && mtime ($icache) > mtime ($0); + if (-f $icache && mtime ($icache) > mtime ($0) + && Autom4te::C4che->good_version ($icache_file, '@VERSION@')); # Add the new trace requests. my $req = Autom4te::C4che->request ('input' => \@ARGV, @@ -1061,7 +1062,7 @@ else # If we ran up to here, the cache is valid. $req->valid (1); -Autom4te::C4che->save ($icache_file); +Autom4te::C4che->save ($icache_file, '@VERSION@'); exit $exit_code; |