Ticket #86 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Copy mode on FreeBSD leaves symlinks in Subversion in "~" state

Reported by: petec Owned by: warner
Priority: major Milestone: 0.7.8
Version: 0.7.5 Keywords:
Cc:

Description

(I sent the following as an email to the mailing list last Sunday but it appears to have been lost.)

Hi,

Below is a patch that seems to fix a Buildbot copy mode issue on FreeBSD with symlinks in a Subversion working tree, where files' contents are copied instead of the symlinks, leaving files in the Subversion "~" state. The patch explicitly sets the -R -P flags which are defined in POSIX and should have the same behavior as GNU cp -r across all POSIX OSes.

I have tested it on FreeBSD and GNU/Linux, but I do not have access to other platforms.

Thanks,

  • Pete Curry <mail@…>
Index: buildbot/slave/commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.84
diff -u -r1.84 commands.py
--- buildbot/slave/commands.py	7 Aug 2007 23:50:40 -0000	1.84
+++ buildbot/slave/commands.py	19 Aug 2007 22:30:29 -0000
@@ -1326,7 +1326,7 @@
         if runtime.platformType != "posix":
             shutil.copytree(fromdir, todir)
             return defer.succeed(0)
-        command = ['cp', '-r', '-p', fromdir, todir]
+        command = ['cp', '-R', '-P', '-p', fromdir, todir]
         c = ShellCommand(self.builder, command, self.builder.basedir,
                          sendRC=False, timeout=self.timeout)
         self.command = c
Index: buildbot/steps/source.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v
retrieving revision 1.7
diff -u -r1.7 source.py
--- buildbot/steps/source.py	3 Jul 2007 19:17:49 -0000	1.7
+++ buildbot/steps/source.py	19 Aug 2007 22:30:30 -0000
@@ -47,8 +47,8 @@
              should be maintained in a separate directory (called the
              'copydir'), using checkout or update as necessary. For each
              build, a new workdir is created with a copy of the source
-             tree (rm -rf workdir; cp -r copydir workdir). This doubles
-             the disk space required, but keeps the bandwidth low
+             tree (rm -rf workdir; cp -R -P -p copydir workdir). This
+             doubles the disk space required, but keeps the bandwidth low
              (update instead of a full checkout). A full 'clean' build
              is performed each time.  This avoids any generated-file
              build problems, but is still occasionally vulnerable to

Change History

comment:1 Changed 4 years ago by warner

  • Owner set to warner
  • Status changed from new to assigned
  • Milestone changed from undecided to 0.7.8

sounds reasonable

comment:2 Changed 4 years ago by warner

  • Status changed from assigned to closed
  • Resolution set to fixed

applied, thanks

Note: See TracTickets for help on using tickets.