You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by id...@apache.org on 2016/01/20 23:52:55 UTC

[2/4] mesos git commit: FreeBSD: use BSD cp in copy provisioner backend.

FreeBSD: use BSD cp in copy provisioner backend.

Review: https://reviews.apache.org/r/41598/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d89da4f6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d89da4f6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d89da4f6

Branch: refs/heads/master
Commit: d89da4f654f8c8a89c260905f124f85d05ca507c
Parents: 8f01423
Author: David Forsythe <df...@gmail.com>
Authored: Wed Jan 20 14:49:05 2016 -0800
Committer: Ian Downes <id...@twitter.com>
Committed: Wed Jan 20 14:52:46 2016 -0800

----------------------------------------------------------------------
 src/slave/containerizer/mesos/provisioner/backends/copy.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d89da4f6/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/copy.cpp b/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
index 86bbe71..f353c89 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
@@ -127,17 +127,17 @@ Future<Nothing> CopyBackendProcess::_provision(
   VLOG(1) << "Copying layer path '" << layer << "' to rootfs '" << rootfs
           << "'";
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
   if (!strings::endsWith(layer, "/")) {
     layer += "/";
   }
 
-  // OSX cp doesn't support -T flag, but supports source trailing
+  // BSD cp doesn't support -T flag, but supports source trailing
   // slash so we only copy the content but not the folder.
   vector<string> args{"cp", "-a", layer, rootfs};
 #else
   vector<string> args{"cp", "-aT", layer, rootfs};
-#endif // __APPLE__
+#endif // __APPLE__ || __FreeBSD__
 
   Try<Subprocess> s = subprocess(
       "cp",