Mpp::BuildCacheControl - Externally usable management commands
Recursively collect all build caches which can be found in the GROUP attribute in the $Mpp::BuildCache::options_file of all the given directories. Actually the file may contain two hashes, only the last of which is read by Mpp::BuildCache::new. This function augments each object with values in the first of the two hashes, if available. After calling this function, these variables are set:
This is set to a list of one or more Mpp::BuildCache objects. These have more attributes than the same objects in makepp:
.. The Mpp::File of the build cache directory. xPREFERRED This is a preferred build cache iff this key exists.
This is set to the number of preferred build caches in the group. These are sorted at the beginning of
This contains the directory names of caches which should have been loaded by the above logic, but weren't, possibly because the disk or server is offline.
group for each element in
@ARGV, and calls code for each group that wasn't already identified by an earlier element.
This function walks the virtual superposition of all caches in the group. Call code only once for every cache entry, whether it is in one cache of the group or replicated to others. The first argument to code is an array of all the absolute path names in the different caches, virtually pointing to the same directory. The list is in the same order as
@group. The second arg is the path to the current file, relative to the cache root.
group must have been called for this to work, even if the "group" consists of only one build cache. The subdir we are currently inspecting relative to the build cache root is in
$try, and gets automatically added during the recursive descent.
In addition to the parameters passed to code there are some global variables:
This holds the name of the current file. Mapping the concatenation of this to the list of dirs gives the pathes to the replicates.
This is a list of arrays containing the list returned by
lstat. The list is in the same order as
@group. For inexistent files this contains undef instead of an array. For symbolic links this contains ext-links, i.e. nlinks-1, the number of external links instead of an array.
Two fields have non-standard meanings:
3 EXTLINK (nlink) Number of links to the file, not counting the one in the cache. 6 BIUID (rdev) The uid of the build info or undef if none.
This is the virtual lstat for the file, where the times are the maximum of all replicates' times. EXTLINK is the sum of all replicates' EXTLINK.