Author: suresh
Date: Mon Nov 12 19:49:08 2012
New Revision: 1408422
URL: http://svn.apache.org/viewvc?rev=1408422&view=rev
Log:
YARN-207. YARN distribution build fails on Windows. Contributed by Chris
Nauroth.
Modified:
hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/CHANGES.branch-trunk-win.txt
hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/pom.xml
Modified:
hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/CHANGES.branch-trunk-win.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/CHANGES.branch-trunk-win.txt?rev=1408422&r1=1408421&r2=1408422&view=diff
==============================================================================
---
hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/CHANGES.branch-trunk-win.txt
(original)
+++
hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/CHANGES.branch-trunk-win.txt
Mon Nov 12 19:49:08 2012
@@ -4,4 +4,6 @@ branch-trunk-win changes - unreleased
(Chris Nauroth via suresh)
YARN-176. Some YARN tests fail to find winutils. (Chris Nauroth via suresh)
-
+
+ YARN-207. YARN distribution build fails on Windows. (Chris Nauroth via
+ suresh)
Modified: hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/pom.xml
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/pom.xml?rev=1408422&r1=1408421&r2=1408422&view=diff
==============================================================================
--- hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/pom.xml
(original)
+++ hadoop/common/branches/branch-trunk-win/hadoop-yarn-project/pom.xml Mon Nov
12 19:49:08 2012
@@ -177,22 +177,22 @@
<goal>run</goal>
</goals>
<configuration>
- <!-- this is identical from hadoop-project-dist, eventually they
must be unified -->
<target if="tar">
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/dist-maketar.sh">
+ <!-- This script preserves permissions and symlinks. -->
+ <!-- Python requires resetting indentation to far left. -->
+ <echo file="${project.build.directory}/dist-maketar.py">
+from os.path import join, normpath
+import tarfile
- which cygpath 2> /dev/null
- if [ $? = 1 ]; then
- BUILD_DIR="${project.build.directory}"
- else
- BUILD_DIR=`cygpath --unix '${project.build.directory}'`
- fi
- cd $BUILD_DIR
- tar czf ${project.artifactId}-${project.version}.tar.gz
${project.artifactId}-${project.version}
+base_name = "${project.artifactId}" + "-" + "${project.version}"
+dir_name = normpath(join(r"${project.build.directory}", base_name))
+tar_name = dir_name + ".tar.gz"
+
+with tarfile.open(tar_name, "w:gz") as tar:
+ tar.add(dir_name, arcname=base_name)
</echo>
- <exec executable="sh" dir="${project.build.directory}"
failonerror="true">
- <arg line="./dist-maketar.sh"/>
+ <exec executable="python" dir="${project.build.directory}"
failonerror="true">
+ <arg value="dist-maketar.py" />
</exec>
</target>
</configuration>