Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



ClearCase Support: Issue with Links and Config Specs


Here is a common problem when dealing with links in ClearCase config specs. This problem is true for both soft links and hard links.

Assume for a moment that you have a regular file called "a.txt", and you have a link to this file called "b.txt". It does not matter if both files are in the same directory or in different directories. So, we have this situation:


a.txt
b.txt -> a.txt


Next, there exist multiple versions of a.txt, like this:


a.txt@@/main/1
a.txt@@/main/2
a.txt@@/main/3


Now, assume that your config spec is set to this:

element b.txt /main/1
element a.txt /main/2
element * /main/LATEST


I have these two questions for you. What version of "b.txt" do you think your config spec is set to access? What version of "a.txt" do you think your config spec is set to access?

I would have assumed that we would access version /main/1 of both files; however in actuality, the config spec is configured to only access /main/2 of both files. Basically, the first rule in the config spec is ignored, since it is not an element.


Here is the worse case situation that I found. Assume that you have a directory and a link to the directory, such as this:

/vob/test/dir1
/vob/test/dir2 -> dir1


If you have any of these rules in your config spec, they will be completely ignored:

element /vob/test/dir2 /main/LATEST
element /vob/test/dir2/file.txt /main/LATEST
element /vob/test/dir2/dir3/file.txt /main/LATEST


The only workaround that I found for this issue is to NOT allow any links, either soft links or hard links, in any config specs…. ever. Also, I have stopped using links completely. I am even starting to remove them.

by Phil for Humanity
on 20090320

Related Articles
 » ClearCase Support: Advanced Config Specs (Part 2)
 » ClearCase Support: Advanced Config Specs (Part 1)
 » ClearCase Support: Common ClearCase Config Spec Error Message