Forcing touch(..) of config files which are stale due to newer includes

This commit is contained in:
Pavel Shevaev 2023-08-24 14:54:36 +03:00
parent 60d097a4d9
commit ec834890ac
1 changed files with 5 additions and 1 deletions

View File

@ -362,7 +362,7 @@ function config_fetch_ex(
return $result;
}
function _config_fetch_cache_ex($results_by_job)
function _config_fetch_cache_ex(array $results_by_job)
{
$result = new ConfigFetchResult();
$total_stales = 0;
@ -387,6 +387,10 @@ function _config_fetch_cache_ex($results_by_job)
{
$is_stale = true;
$cache_entry = _config_invalidate_cache($file, $cache_file);
//NOTE: let's change the mtime of the file which include other files,
// so that on tne next build it will be 'older' than its includes
// and won't trigger rebuild
touch($file);
}
if($is_stale)