Repository: spark
Updated Branches:
  refs/heads/branch-2.1 62a6577bf -> b23220fa6


[MINOR] Handle fact that mv is different on linux, mac

Follow up to 
https://github.com/apache/spark/commit/ae853e8f3bdbd16427e6f1ffade4f63abaf74abb 
as `mv` throws an error on the Jenkins machines if source and destinations are 
the same.

Author: Shivaram Venkataraman <shiva...@cs.berkeley.edu>

Closes #16302 from shivaram/sparkr-no-mv-fix.

(cherry picked from commit 5a44f18a2a114bdd37b6714d81f88cb68148f0c9)
Signed-off-by: Shivaram Venkataraman <shiva...@cs.berkeley.edu>


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

Branch: refs/heads/branch-2.1
Commit: b23220fa67dd279d0b8005cb66d0875adbd3c8cb
Parents: 62a6577
Author: Shivaram Venkataraman <shiva...@cs.berkeley.edu>
Authored: Thu Dec 15 17:13:35 2016 -0800
Committer: Shivaram Venkataraman <shiva...@cs.berkeley.edu>
Committed: Thu Dec 15 17:13:43 2016 -0800

----------------------------------------------------------------------
 dev/make-distribution.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/b23220fa/dev/make-distribution.sh
----------------------------------------------------------------------
diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh
index da44748..6ea319e 100755
--- a/dev/make-distribution.sh
+++ b/dev/make-distribution.sh
@@ -228,8 +228,11 @@ if [ "$MAKE_R" == "true" ]; then
   # Install source package to get it to generate vignettes, etc.
   # Do not source the check-cran.sh - it should be run from where it is for it 
to set SPARK_HOME
   NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh
-  # Move R source package to file name matching the Spark release version.
-  mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz 
$SPARK_HOME/R/SparkR_"$VERSION".tar.gz
+  # Move R source package to match the Spark release version if the versions 
are not the same.
+  # NOTE(shivaram): `mv` throws an error on Linux if source and destination 
are same file
+  if [ "$R_PACKAGE_VERSION" != "$VERSION" ]; then
+    mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz 
$SPARK_HOME/R/SparkR_"$VERSION".tar.gz
+  fi
   popd > /dev/null
 else
   echo "Skipping building R source package"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to