1

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
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Sahil
  • 359
  • 2
  • 5
  • 13

1 Answers1

1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for an explanatory answer. However, issue is not with the rights. 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: 1)Process Create Label Lock for label_name in the VOB: vob_1 2)Label label_name has been locked 3)Process Create Label Lock for label_name in the VOB: vob_2 4)Label label_name has been locked 5)LABELING FAILED 6)Flag created: /user/msatcmsvn/build_artifacts/label_name_LABEL.FLAG – Sahil Apr 21 '16 at 08:44