[Cook] RE: [Aegis]cook+aegis question (builtin resolve)
Peter Miller
peterm at platypus.net
Fri Jan 31 08:35:26 EST 2003
Aryeh M. Friedman writes...
> Does the builtin resolve function in cook only match against
> the baseline
> and/or stuff that should be in the baseline after
> intergration (i.e. only
> see baseline files and/or aenf'ed stuff).
The [search_list] is simply a list of directories to search, in order.
The [resolve] function matches Cook's internal search of this list,
which it performs whenever it needs to stat(2) a file to determine its
last modification time, or when it needs to open(2) a file to determine
its fingerprint.
If you use Aegis' $search_path substitution, the search order is (1) the
development directory, (2) the branch's baseline, (3) the branch's
parent's baseline, etc.
> Also what is the
> return value
> if the file is not resolvable?
The first in the list. This is because it is assumed that you want to
build remote sources in the current directory. (The search_list
documentation even says that the first element of the list is *always*
dot (.) i.e. the current directory.)
> Specifically I want to do something like:
>
> if [not [resolve foo]] then touch foo;
Try
if [not [exists [resolve foo]]] then
{
touch foo
set clearstat;
}
The clearstat is so that cook knows that you have messed with file
existence in some way, and it needs to invalidate it's stat cache.
Regards
Peter Miller <millerp at canb.auug.org.au>
/\/\* http://www.canb.auug.org.au/~millerp/
More information about the Cook-users
mailing list