Build (definition) fails when keeping workspace between builds which contains symlinks
Hey!
We have a component in RTC which contains several symlinks, some of which are at will broken. Checking the component out works. However, we have decided to create a build definition for the component to build packages. I created a build definition where I specified the workspace to use, containing the buildroot component. I unchecked "Delete directory before loading" to keep the workspace. Otherwise it would take every time we request a build 3 hours just to build one package.
The first build request worked, but at the second time it seems it tries to load the workspace again, and fails than with the following error.
Fetching files to fetch destination "/home/data2/prj_sw/workspaces/jazzdevel/buildroot_build.nobackup" ...com.ibm.team.filesystem.client.FileSystemException: Unable to create symbolic link /buildroot/system/skeleton/etc/mtab to target ../proc/self/mounts : /home/data2/prj_sw/workspaces/jazzdevel/buildroot_build.nobackup/buildroot/system/skeleton/etc/mtab at com.ibm.team.filesystem.client.internal.FileStorageWrapper.create(FileStorageWrapper.java:390) at com.ibm.team.filesystem.client.internal.load.MergeLoadMutator$1.run(MergeLoadMutator.java:1110) at com.ibm.team.filesystem.client.internal.SharingManager.doSilentChange(SharingManager.java:775) at com.ibm.team.filesystem.client.internal.load.MergeLoadMutator.createNewLink(MergeLoadMutator.java:1107) at com.ibm.team.filesystem.client.internal.load.MergeLoadMutator.load(MergeLoadMutator.java:580) at com.ibm.team.filesystem.client.internal.load.MergeLoadMutator.execute(MergeLoadMutator.java:317) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.operations.LoadOperation.load(LoadOperation.java:1105) at com.ibm.team.filesystem.client.internal.operations.LoadOperation$1.run(LoadOperation.java:715) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:77) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:89) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:165) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:145) at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(LoadOperation.java:753) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.build.internal.scm.SourceControlUtility.updateFileCopyArea(SourceControlUtility.java:664) at com.ibm.team.build.internal.engine.JazzScmPreBuildParticipant.preBuild(JazzScmPreBuildParticipant.java:244) at com.ibm.team.build.internal.engine.BuildLoop.invokePreBuildParticipants(BuildLoop.java:958) at com.ibm.team.build.internal.engine.BuildLoop$3.run(BuildLoop.java:764) at java.lang.Thread.run(Thread.java:853)Caused by: org.eclipse.core.runtime.CoreException: /home/data2/prj_sw/workspaces/jazzdevel/buildroot_build.nobackup/buildroot/system/skeleton/etc/mtab at com.ibm.team.filesystem.client.internal.Java17SymLinkHelper.createSymlink(Java17SymLinkHelper.java:57) at com.ibm.team.filesystem.client.internal.Java17SymLinkHelper.createSymlink(Java17SymLinkHelper.java:148) at com.ibm.team.filesystem.client.internal.ManagedFileStore.createSymlink(ManagedFileStore.java:265) at com.ibm.team.filesystem.client.internal.ManagedFileStore.symlink(ManagedFileStore.java:308) at com.ibm.team.filesystem.client.internal.FileStorageWrapper.create(FileStorageWrapper.java:387) ... 20 moreCaused by: java.nio.file.FileAlreadyExistsException: /home/data2/prj_sw/workspaces/jazzdevel/buildroot_build.nobackup/buildroot/system/skeleton/etc/mtab at sun.nio.fs.UnixException.translateToIOException(UnixException.java:100) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:114) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:119) at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:468) at java.nio.file.Files.createSymbolicLink(Files.java:1005) at com.ibm.team.filesystem.client.internal.Java17SymLinkHelper.createSymlink(Java17SymLinkHelper.java:55) ... 24 more
Product and OS version: RTC 6.0.3, Debian 9
Thank you for your help!