Community
Participate
Working Groups
eclipse version: 3.0M5 This behaviour is introduced by the fix of bug #41056. When a resource file is locked (i.e., the immutable bit is set) in the source folder, then the immutable bit is also set in te output folder. So, a rebuild of the project fails, since it can't clean the output folder. If you use the Perforce SCM, then all files that are not open for edit, have the immutable bit set, so all non *.java resources in the source directory that are not 'open for edit' have this problem. commenting line 157 of the file plugins/org.eclipse.core.resources.macosx/src/core.c (source distribution of M5) solves the problem. (Maybe a more general solution is to make always all files in the output folder not readonly)
I will look into the problem...
Hmmh, this looks like an ugly problem... I don't think we should change the behavior of CoreFileSystemLibrary.internalCopyAttributes to ignore the immutable bit. This would break the semantics of internalCopyAttributes. In addition, when copying a readonly file with Unix "cp", the native behavior is to preserve the readonly state. So I don't see why Eclipse should clear the readonly bit when copying files. On the other hand I understand that the current behavior is unsatifactory: - you checkout a resource file -> Perforce makes it readonly - you build -> the readonly file is copied to the out folder and its readonly state is preserved - you start to edit the file -> the readonly bit is cleared on the source side - you trigger another build -> the file is copied but the copy fails because the destination is still readonly. May be the build can better handle this situation since it understands why the copy fails (or could clear the readonly bit first). In any case, a workaround would be to use a post build Ant script to clear the readonly state on resource files. John, any comments?
I agree that preserving permission bits for the generic copy command is desirable. It sounds like the java builder should call IResource.setReadOnly(false) wherever they are currently calling IResource.setDerived(true).
Created attachment 7275 [details] Patch against org.eclipse.jdt.core v_396 Got a little annoyed by the problem... Patch adds setReadOnly calls to all places where JDT calls setDerived (as suggested) on a copied resource. Also verified that problem with Perforce is gone.
Any news on this bug? It totally prevents usage of Eclipse on MacOS in combination with Perforce...
Ok will schedule it for M7.
Kent, if simple enough, we may consider it for 2.1 stream as well.
Now set any copied resource to NOT readOnly.
Verified for 3.0M7