hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1441812 - /hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
Date Sat, 02 Feb 2013 21:59:07 GMT
Author: suresh
Date: Sat Feb  2 21:59:06 2013
New Revision: 1441812

URL: http://svn.apache.org/viewvc?rev=1441812&view=rev
Log:
HADOOP-9271. Revert Python build scripts from branch-trunk-win. Contributed by Chris Nauroth.

Modified:
    hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml

Modified: hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml?rev=1441812&r1=1441811&r2=1441812&view=diff
==============================================================================
--- hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
(original)
+++ hadoop/common/branches/branch-trunk-win/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
Sat Feb  2 21:59:06 2013
@@ -537,20 +537,20 @@
                     <delete dir="${project.build.directory}/tomcat.exp"/>
                     <mkdir dir="${project.build.directory}/tomcat.exp"/>
 
-                    <!-- This script preserves permissions and symlinks. -->
-                    <!-- Python requires resetting indentation to far left. -->
-                    <echo file="${project.build.directory}/tomcat-untar.py">
-from os.path import abspath
-import tarfile
+                    <!-- Using Unix script to preserve file permissions -->
+                    <echo file="${project.build.directory}/tomcat-untar.sh">
 
-src = abspath(r"${basedir}/downloads/apache-tomcat-${tomcat.version}.tar.gz")
-dest = abspath(r"${project.build.directory}/tomcat.exp")
-
-with tarfile.open(src, "r:gz") as tar:
-  tar.extractall(path=dest)
+                      which cygpath 2&gt; /dev/null
+                      if [ $? != 0 ]; then
+                      BUILD_DIR="${project.build.directory}"
+                      else
+                      BUILD_DIR=`cygpath --unix '${project.build.directory}'`
+                      fi
+                      cd $BUILD_DIR/tomcat.exp
+                      gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar
xf -
                     </echo>
-                    <exec executable="python" dir="${project.build.directory}" failonerror="true">
-                      <arg line="tomcat-untar.py"/>
+                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                      <arg line="./tomcat-untar.sh"/>
                     </exec>
 
                     <move file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
@@ -580,21 +580,20 @@ with tarfile.open(src, "r:gz") as tar:
                 </goals>
                 <configuration>
                   <target if="tar">
-                    <!-- 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 abspath, join
-import tarfile
-
-base_name = "${project.artifactId}" + "-" + "${project.version}"
-dir_name = abspath(join(r"${project.build.directory}", base_name))
-tar_name = dir_name + ".tar.gz"
+                    <!-- Using Unix script to preserve symlinks -->
+                    <echo file="${project.build.directory}/dist-maketar.sh">
 
-with tarfile.open(tar_name, "w:gz") as tar:
-  tar.add(dir_name, arcname=base_name)
+                      which cygpath 2&gt; /dev/null
+                      if [ $? != 0 ]; then
+                      BUILD_DIR="${project.build.directory}"
+                      else
+                      BUILD_DIR=`cygpath --unix '${project.build.directory}'`
+                      fi
+                      cd $BUILD_DIR
+                      tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                     </echo>
-                    <exec executable="python" dir="${project.build.directory}" failonerror="true">
-                      <arg value="dist-maketar.py" />
+                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                      <arg line="./dist-maketar.sh"/>
                     </exec>
                   </target>
                 </configuration>



Mime
View raw message