Creating links to derived objects

You cannot make a VOB hard link to a derived object, but can make view-private hard links to a derived object.

You can make one or more view-private hard links to a derived object, using the UNIX or Linux ln command, with these restrictions:

  • The derived object must be visible in the dynamic view where the view-private hard link is to be created; that is, it must appear in a standard UNIX or Linux ls listing. (You can use the winkin command to satisfy this requirement.)
  • The path name of the hard link must be within the same VOB as the original derived object.

All hard links to a derived object, including the name under which it was originally created, appear with the same DO ID in an HCL VersionVault ls listing; if there are multiple names for a derived object in the same directory, all are listed. For example:

% ln hello hw
% cleartool ls
...
hello@@19-May.19:15.232
hw@@19-May.19:15.232
...

In a catcr or describe command, you can reference a derived object using any of its hard links; all the references are equivalent. But an lsdo command must reference a derived object by its original name, not by any of its subsequently created hard links. Likewise, a derived object can be winked in only at its original path name.

Special case: If a hard link is created by the same build script as the derived object itself, the hard link becomes an additional name for the DO. lsdo lists the hard link, and clearmake can wink in using the hard link's path name.

Each additional hard link increments a derived object's reference count. An lsdo -l listing includes the reference counts and the dynamic views in which the references exist. The (2) in this example shows that view old.vws has two references to hello:

% cleartool lsdo -long hello 
08-Dec-03.12:06:19 Chuck Jackson (test user) (jackson.dvt@oxygen)
 create derived object "hello@@08-Dec.12:06.234"
 references: 2 => oxygen:/usr/vobstore/tut/old.vws (2)