kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/3] incubator-kudu git commit: KUDU-1359. Fix some check_compatibility.py on OSX
Date Wed, 04 May 2016 19:39:29 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 2b86e94d9 -> 3b94aa217


KUDU-1359. Fix some check_compatibility.py on OSX

bsdtar is different than GNU tar in that it doesn't support --wildcards, so
we first need to list the proto files then extrat them.

Change-Id: If7954c44b21d247091dd6f542e7e5e8c5d658337
Reviewed-on: http://gerrit.cloudera.org:8080/2944
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Jean-Daniel Cryans


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/90edeabb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/90edeabb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/90edeabb

Branch: refs/heads/master
Commit: 90edeabb3dc06ca13e1df6c787611aeca623a6e4
Parents: 2b86e94
Author: Jean-Daniel Cryans <jdcryans@apache.org>
Authored: Tue May 3 13:03:24 2016 -0700
Committer: Jean-Daniel Cryans <jdcryans@gerrit.cloudera.org>
Committed: Tue May 3 23:32:29 2016 +0000

----------------------------------------------------------------------
 build-support/check_compatibility.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/90edeabb/build-support/check_compatibility.py
----------------------------------------------------------------------
diff --git a/build-support/check_compatibility.py b/build-support/check_compatibility.py
index 70c399f..a8b8e3e 100755
--- a/build-support/check_compatibility.py
+++ b/build-support/check_compatibility.py
@@ -30,6 +30,7 @@ import re
 import shutil
 import subprocess
 import sys
+import tempfile
 
 from kudu_util import check_output
 
@@ -79,11 +80,19 @@ def checkout_java_tree(rev, path):
                          ("git archive --format=tar %s java/ | " +
                           "tar -C \"%s\" -xf -") % (rev, path)],
                         cwd=get_repo_dir())
+
   # Extract proto files which the Java build also relies on.
+  # bsdtar doesn't support --wildcards so we need to extract them in two steps.
+  git_tar_cmd = "git archive --format=tar %s src/" % rev
+  proto_filenames_file = tempfile.NamedTemporaryFile()
+  subprocess.check_call(["bash", '-o', 'pipefail', "-c",
+                         git_tar_cmd + " | tar -t | grep -a '\.proto$'"],
+                        cwd=get_repo_dir(), stdout=proto_filenames_file)
   subprocess.check_call(["bash", '-o', 'pipefail', "-c",
-                         ("git archive --format=tar %s src/ | " +
-                          "tar -C \"%s\" --wildcards -xf - '*.proto'") % (rev, path)],
+                          git_tar_cmd + " | " +
+                          ("tar -C \"%s\" -xT %s") % (path, proto_filenames_file.name)],
                         cwd=get_repo_dir())
+
   # Symlink thirdparty from the outer build so that protoc is available.
   # This may break at some point in the future if we switch protobuf versions,
   # but for now it's faster than rebuilding protobuf in both trees.


Mime
View raw message