avoid checkin errors during a build in clearcase

You can check out, build, and check in during a build, however, the checked in version will not be seen during that build's session. An example makefile following the below logic will cause the existing build not to see newly checkedin files:

foo:

cleartool checkout -nc $@

build $@

cleartool checkin -nc $@

The build will checkout foo, build it, and check foo back in, but will warn that the newly checked in version is not selected by the view, with a warning such as the following:

cleartool: Warning: Version checked in is not selected by view.

Checked in "foo" version "/main/2".

If the object that is being checked in is a directory, the error will look like this:

cleartool: Warning: Operation "view_readdir_ext" failed: directory not selected in configuration specification.

cleartool: Warning: VOB updated, but view update of uncheckout of "directory_name" failed: directory not selected in configuration specification.

cleartool: Warning: Version checked in is not selected by view.
Checked in "directory_name" version "/main/9".

To avoid any possible problems, merely put off the checkin until the entire build has finished.

For example:

.c.o:

cleartool checkout $@

cc -c $<

all: foo checkin

foo: foo.o

cc -o $@ foo.o

checkin:

cleartool checkin -nc foo foo.o

The checkedout, rebuilt version of foo.o and foo would be available to other processes running within the same build, just like any other DO's would be. Of course, the build scripts would need to add error checking so that the checkout or checkin commands are not executed on files that aren't checked in or out (respectively). This means that the makefile must be carefully worded to avoid this sort of situation.

No comments:

Post a Comment