References of derived objects are invalid

90 Views Asked by At

there are some derived objects with references to a view. However, referenced view does not have that derived object.

Is there a way to delete those derived objects (DO) with invalid/unused references?

(I believe that the cause of the problem is deleted views. We had views that had problems, and had to force remove them (using uuid). Then we created new views with the same name. Now, a DO has a reference to a view (I cant see the uuid) but DO is not used in that view. I suspect that the referenced view is the old one)

2

There are 2 best solutions below

0
yusuf On BEST ANSWER

Here is the slow solution I found: I listed all DOs in each vob (cleartool lsdo -recurse), then listed all used DOs in views (cleartool lsprivate -do). Then I listed the ones that are not in the second list. I wrote an rmdo script for those items.

4
VonC On

If it is a deleted view, you can delete all references to that view with:

cleartool rmview -vob /vobs/MyVob -force -uuid 3c2ed44a.eda842f1.a7f8.73:09:e2:c9:12:ac

Replace /vobs/MyVob by the Vob tag where the view is used.
And replace 3c2ed44a.eda842f1.a7f8.73:09:e2:c9:12:ac by the old deleted view uuid.

You can find that uuid with:

cleartool descr -l vob:/vobs/MyVob

That follows "How to remove checked-out references of a view from a VOB".

However, if you mention "We had views that had problems, and had to force remove them (using uuid).", that cleartool rmview command might not be enough to un-reference those DO's (Derived Objects).

There was an old issue for ClearCase 7 about that.

That approach (rmview --force --uuid is confirmed with "About rgy_getuuid_by_uuid failed errors":

For example, clearmake may provide the following warning when attempting to access a view that no longer exists, but had sharable Derived Objects:

clearmake: Warning: View "ccsvr:c:\ccstg\views\tempview2.vws" unavailable -
This process will not contact the view again for 60 minutes.

If the view was removed or is inaccessible, references to the view have to be removed with the cleartool rmview -uuid command.
This command will remove all references to a given view in all mounted VOBs (review to technote 1122515 for more details):

Again, a rmview --uuid is shown there.