If the contents of the target of a symlink is updated and noclobber is set on the workspace the next sync fails. For example:
P4 Task: syncing files at change: 1980... p4 sync /var/lib/jenkins/workspace/Symlinks/...@1980 P4 Task: attempt: 1 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s): Can't clobber writable file /var/lib/jenkins/workspace/Symlinks/aLinux/target/F1
The permission on the target is OK. P4-Plugin does set the symlink permission to be 'w':
lrwxrwxrwx 1 jenkins jenkins 12 Oct 1 14:13 ./aLinux/links/F1_link -> ../target/F1 -r--r--r-- 1 jenkins jenkins 89 Oct 1 14:13 ./aLinux/target/F1
P4 command line would set the same permissions but will correctly sync the files with the same permission. For example:
$ ls -ld $(find .)
drwxr-xr-x 4 kwirth kwirth 4096 Jul 2 11:16 .
drwxr-xr-x 2 kwirth kwirth 4096 Oct 1 15:33 ./links
lrwxrwxrwx 1 kwirth kwirth 12 Oct 1 15:33 ./links/F1_link -> ../target/F1
drwxr-xr-x 3 kwirth kwirth 4096 Oct 1 15:34 ./target
-r--r--r-- 1 kwirth kwirth 134 Oct 1 15:34 ./target/F1
$ p4 sync ...
//depot/symlink/aLinux/target/F1#3 - updating /ws/symlink/aLinux/target/F1
Reproduction Steps:
- Add a target and symlink to Perforce from your Linux Perforce workspace.
- Create a freestyle job to sync the path containing the symlink.
- Before saving the job untick 'clobber'.
- Set the job to only build on one Linux node and set the populate option to 'Auto Cleanup And Sync'.
- Save the job.
- Run the job.
- Make an edit to the symlink to point to a new target and submit it from your Linux workspace.
- Run the job.
Result:
The "Can't clobber writable file" error is seen.
Expected Result:
Target is synced without error.
- is related to
-
JENKINS-59213 P4 Plugin - Errors when syncing symlinks
-
- Closed
-
[JENKINS-59611] Symlink target update fails when "noclobber" set
Labels | New: P4_VERIFY |
Rank | New: Ranked higher |
Rank | New: Ranked higher |
Issue Type | Original: Improvement [ 4 ] | New: Bug [ 1 ] |
Rank | New: Ranked lower |
Link |
New:
This issue is related to |
Rank | New: Ranked higher |
Rank | New: Ranked higher |
Description |
Original:
If the contents of the target of a symlink is updated and noclobber is set on the workspace the next sync fails. For example: {code:java} P4 Task: syncing files at change: 1980... p4 sync /var/lib/jenkins/workspace/Symlinks/...@1980 P4 Task: attempt: 1 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s): Can't clobber writable file /var/lib/jenkins/workspace/Symlinks/aLinux/target/F1 {code} The permission on the target is OK. P4-Plugin does set the symlink permission to be 'w': {code:java} lrwxrwxrwx 1 jenkins jenkins 12 Oct 1 14:13 ./aLinux/links/F1_link -> ../target/F1 -r--r--r-- 1 jenkins jenkins 89 Oct 1 14:13 ./aLinux/target/F1 {code} P4 command line would set the same permissions but will correctly sync the files with the same permission. For example: {code:java} $ ls -ld $(find .) drwxr-xr-x 4 kwirth kwirth 4096 Jul 2 11:16 . drwxr-xr-x 2 kwirth kwirth 4096 Oct 1 15:33 ./links lrwxrwxrwx 1 kwirth kwirth 12 Oct 1 15:33 ./links/F1_link -> ../target/F1 drwxr-xr-x 3 kwirth kwirth 4096 Oct 1 15:34 ./target -r--r--r-- 1 kwirth kwirth 134 Oct 1 15:34 ./target/F1 $ p4 sync ... //depot/symlink/aLinux/target/F1#3 - updating /ws/symlink/aLinux/target/F1{code} *Reproduction Steps:* # Add a target and symlink to Perforce from your Linux Perforce workspace. # Create a freestyle job to sync the path containing the symlink. # Before saving the job untick 'clobber'. # Set the job to only build on one Linux node and set the populate option to 'Auto Cleanup And Sync'. # Save the job. # Run the job. # Make an edit to the target of the symlink and submit it from your Linux workspace. # Run the job. *Result:* The "Can't clobber writable file" error is seen. *Expected Result:* Target is synced without error. |
New:
If the contents of the target of a symlink is updated and noclobber is set on the workspace the next sync fails. For example: {code:java} P4 Task: syncing files at change: 1980... p4 sync /var/lib/jenkins/workspace/Symlinks/...@1980 P4 Task: attempt: 1 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s): Can't clobber writable file /var/lib/jenkins/workspace/Symlinks/aLinux/target/F1 {code} The permission on the target is OK. P4-Plugin does set the symlink permission to be 'w': {code:java} lrwxrwxrwx 1 jenkins jenkins 12 Oct 1 14:13 ./aLinux/links/F1_link -> ../target/F1 -r--r--r-- 1 jenkins jenkins 89 Oct 1 14:13 ./aLinux/target/F1 {code} P4 command line would set the same permissions but will correctly sync the files with the same permission. For example: {code:java} $ ls -ld $(find .) drwxr-xr-x 4 kwirth kwirth 4096 Jul 2 11:16 . drwxr-xr-x 2 kwirth kwirth 4096 Oct 1 15:33 ./links lrwxrwxrwx 1 kwirth kwirth 12 Oct 1 15:33 ./links/F1_link -> ../target/F1 drwxr-xr-x 3 kwirth kwirth 4096 Oct 1 15:34 ./target -r--r--r-- 1 kwirth kwirth 134 Oct 1 15:34 ./target/F1 $ p4 sync ... //depot/symlink/aLinux/target/F1#3 - updating /ws/symlink/aLinux/target/F1{code} *Reproduction Steps:* # Add a target and symlink to Perforce from your Linux Perforce workspace. # Create a freestyle job to sync the path containing the symlink. # Before saving the job untick 'clobber'. # Set the job to only build on one Linux node and set the populate option to 'Auto Cleanup And Sync'. # Save the job. # Run the job. # Make an edit to the symlink to point to a new target and submit it from your Linux workspace. # Run the job. *Result:* The "Can't clobber writable file" error is seen. *Expected Result:* Target is synced without error. |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Rank | New: Ranked higher |