vtk_place

vtk_place_find

Usage:         
vtk_place_find database filename [-nocheck]

Description:   
Find a place with given database and name. If the option -nocheck is given, then the timestamp of the place is NOT checked. 

Example:
vtk_place_find FILE /usr/bin/cp 
00012345 
vtk_place_find FILE /usr/bin/cp -nocheck 
00012345

Returns:       
The id of the place or 0 if the place could not be found.

vtk_place_get

Usage:         
vtk_place_get placeId [array]

Description:   
We recommend that you always pass the second argument, which is an array, because this is the new syntax and yields much more detail. 
The old syntax, with just the placeId, returns a list of: 
              
1. status 
2. barrier_flag 
3. node_timestamp 
4. db 
5. name 
6. file_timestamp 
              
With the optional array argument, the array is filled with information about the place. 
              
Examples:      

With the placeId as unique argument:
vtk_place_get 3137 
VALID BARRIER date FILE {${TOP}/placeinfo.hh} date 

With the optional array argument: 
vtk_place_get 3137 fileInfo 
parray fileInfo fileInfo(db)    = FILE 
fileInfo(dir)                   = {${BUILD_TOP}/include} 
fileInfo(name)                  = {${BUILD_TOP}/include/placeinfo.hh} 
fileInfo(status)                = VALID 
fileInfo(tail)                  = placeinfo.hh 
fileInfo(timestamp)             = 1025278326 
fileInfo(md5flag)               = 0

Returns:       
A list

vtk_place_get_or_create

Usage:         
vtk_place_get_or_create database,  placeName, [-zippable | -check | -canonical | -recanonicalize | -log | -nop | -trigger ACTION | -md5 boolean ] database,  placeName, [0|1]

Description:   
Also called vtk_place_find_or_create. Find or create a place by providing database and name. 
The optional third argument 'checkIt' determines whether the server should check the place 
(generally a file with stat()) or not. This has implication with NFS cacheing. The default value 
for the flag is 0, meaning that the server does not check the file. 
              
Options: 
* -zippable        The place is zippable. 
* -check           The place timestamp will be checked by the server upon creation. 
* -canonical       The name of the place is already canonical. 
* -recanonicalize  The name may need to be recanonicalized. 
* -trigger,run     Trigger a retrace of the downcone. 
* -trigger,stop    Trigger a stop of all running jobs of the downcone. 
* -md5 boolean     Use md5 for barriers. 
* -log             Label this place as an {important log} 
* -nop             Do nothing. 
                
Example: 
vtk_place_get_or_create FILE abc 
vtk_place_get_or_create FILE {$TOP/data/abc} -canonical 
vtk_place_get_or_create FILE {$TOP/data/abc} -md5 1 
vtk_place_get_or_create FILE {$TOP/data/main.log} -log 

Return:          
The id of the place.

vtk_place_list_find

Usage:         
vtk_place_list_find format, listOfNames

Description:   
Given a list of names, find all the corresponding files, reporting information using the given format. 
If the file is not found in the trace, the string UNKNOWN is reported. This procedure is used, 
for example, by the command vls. 
              
Examples:
set listOfNames [glob [pwd]/*.html]
vtk_place_list_find "@ID@ @STATUS@ @TAIL@" $listOfNames
02049511 VALID vncsummary.html
00014103 VALID vncgroups.html
00014099 VALID vncinstall.html
UNKNOWN zx.html


vtk_place_set

Usage:         
vtk_place_set placeId array

Description:   
Only the fields db, name, and zippable can be set 

Example
set array(name)    "abc"
set array(db)      "FILE"
set array(barrier) "1"
vtk_place_set $placeId array

vtk_place_update

Usage:         
vtk_place_update placeId

Description:
The main reason for this procedure to exist is to allow a client to update TIMESTAMP information about a file in cases in which the vovserver may be unable to get the correct information because of the NFS cache.
This procedure will update the following information: existence, timestamp, zipped flag This procedure works only for places in the DB "FILE", those most affected by the NFS caching problem. All other places are silently ignored.


Example:    
set placeId [vtk_place_find "FILE" $fileName -nocheck]
vtk_place_update $placeId