#2051: CST stage always regenerates all files ----------------------+----------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: new Priority: major | Milestone: Component: Cactus | Version: development version Keywords: | ----------------------+----------------------------------------------------- I notice that since recently, the Cactus CST stage always regenerates all files, which means that any change to a ccl file or the thorn list will recompile all source files, which is very slow.
I find that this patch resolves the problem:
{{{ $ git diff CSTUtils.pl diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl index 532f6a77..209b9352 100644 --- a/lib/sbin/CSTUtils.pl +++ b/lib/sbin/CSTUtils.pl @@ -182,8 +182,8 @@ sub WriteFile if (-e $filename) { # only read the file if it its size equals the length of the rdata string - my @fileinfo = stat ($filename); - if ($fileinfo[7] == length ($$rdata)) + my $filesize = -s $filename; + if ($filesize == length ($$rdata)) { open(IN, "< $filename"); $data_in = join ('', <IN>); }}}
Apparently, something fishy is happening when calling {{{stat}}}.