You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2020/06/26 12:23:33 UTC

[arrow] branch master updated: ARROW-9224: [Dev][Archery] clone local source with --shared

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a35c956  ARROW-9224: [Dev][Archery] clone local source with --shared
a35c956 is described below

commit a35c95697024539dce110eae77e4268da4883e91
Author: Yibo Cai <yi...@arm.com>
AuthorDate: Fri Jun 26 07:23:03 2020 -0500

    ARROW-9224: [Dev][Archery] clone local source with --shared
    
    `archery benchmark diff` runs "git clone --local" to clone source code
    to /tmp. If /tmp and source directory are at different disk volumes, it
    fails because "git clone --local" uses hard links which only works on
    same volume. This patch replaces "--local" with "--shared".
    
    Error log:
    fatal: failed to create link '/tmp/arrow-archery-lwm7k6wm/origin_master/arrow/.git/objects/2d/80a4d2da431dbfe3c736b6349eb4a0bcb6ece5': Invalid cross-device link
    subprocess.CalledProcessError: Command '['git', 'clone', '--local', PosixPath('/home/cyb/arrow'), '/tmp/arrow-archery-lwm7k6wm/origin_master/arrow']' returned non-zero exit status 128.
    
    Closes #7541 from cyb70289/archery
    
    Authored-by: Yibo Cai <yi...@arm.com>
    Signed-off-by: Wes McKinney <we...@apache.org>
---
 dev/archery/archery/utils/source.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev/archery/archery/utils/source.py b/dev/archery/archery/utils/source.py
index 4f542e8..305f830 100644
--- a/dev/archery/archery/utils/source.py
+++ b/dev/archery/archery/utils/source.py
@@ -143,7 +143,9 @@ class ArrowSources:
         # A local clone is required to leave the current sources intact such
         # that builds depending on said sources are not invalidated (or worse
         # slightly affected when re-invoking the generator).
-        git.clone("--local", self.path, clone_dir)
+        # "--local" only works when dest dir is on same volume of source dir.
+        # "--shared" works even if dest dir is on different volume.
+        git.clone("--shared", self.path, clone_dir)
 
         # Revision can reference "origin/" (or any remotes) that are not found
         # in the local clone. Thus, revisions are dereferenced in the source