Clearcase Command for labeling Fails

162 Views Asked by At

We are applying labels recursively to a VOB.

Following clearcase command is failing and in turn the process of labelling a whole vob is failing.
To be honest, I am not aware of what every word means in this command.
Can you please explain what it does so that i could figure out why the process of labeling is failing.

Also I have attached the error code it's throwing:

cleartool ls -recurse -vob_only -visible -short | xargs cleartool mklabel -replace -follow <label_name>
ERROR CODE:     256
1

There are 1 best solutions below

1
VonC On

cleartool mklabel is applied to each element returned by cleartool ls, restricting the listing to objects in the VOB storage, and visible to the operating system listing command.

However, a cleartool mklabel -replace (which moves an existing label if found) means you must have the right to modify that label, or be element owner.

Try first the mklabel command in isolation on a single file before using it in an xargs pipe.

Try also an alternative syntax I proposed before:

# Windows syntax
cleartool find . -cview -exec "cleartool mklabel -replace TEST_LABEL \"%CLEARCASE_XPN%\""

# Unix syntax
cleartool find . -cview -exec 'cleartool mklabel -replace TEST_LABEL "$CLEARCASE_XPN"'

The OP adds:

The weird thing is that from the logs labeling seems successful for all the files. (Created label "label_name" on "filepath" version "/main/3".)

But when it exits it throws this error:

Process Create Label Lock for label_name in the VOB: vob_1 
Label label_name has been locked 
Process Create Label Lock for label_name in the VOB: vob_2 
Label label_name has been locked 
LABELING FAILED 
Flag created: /user/msatcmsvn/build_artifacts/label_name_LABEL.FLAG 

It depends if the label was applied to an element in vob1, 2 or another vob.
Generally, this message is linked to a global type locked or to the lbtype locked in vob1 and two.

A cleartool lslock lbtype:LABELNAME@\vob1 (or @/vobs/vob1) on Unix, as well as a cleartool descr -l lbtype:LABELNAME@\vob1 can help see the issue.