You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by se...@apache.org on 2016/03/29 01:54:06 UTC

yetus git commit: YETUS-345. mvn dependency dupe fix broke hadoop

Repository: yetus
Updated Branches:
  refs/heads/master 66352f53e -> 7355288fe


YETUS-345. mvn dependency dupe fix broke hadoop

Signed-off-by: Sean Busbey <bu...@apache.org>
Signed-off-by: Kengo Seki <se...@apache.org>


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

Branch: refs/heads/master
Commit: 7355288fee3d503442583423a0a829d5150ed118
Parents: 66352f5
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed Mar 23 10:03:32 2016 -0700
Committer: Kengo Seki <se...@apache.org>
Committed: Tue Mar 29 08:51:35 2016 +0900

----------------------------------------------------------------------
 precommit/test-patch.d/checkstyle.sh |  2 +-
 precommit/test-patch.d/maven.sh      | 25 ++++++++++++++-----------
 precommit/test-patch.sh              |  4 ++--
 3 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/7355288f/precommit/test-patch.d/checkstyle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/test-patch.d/checkstyle.sh
index de1935f..4363e4d 100755
--- a/precommit/test-patch.d/checkstyle.sh
+++ b/precommit/test-patch.d/checkstyle.sh
@@ -365,7 +365,7 @@ function checkstyle_postapply
     statstring=$(generic_calcdiff_status "${numbranch}" "${numpatch}" "${addpatch}" )
 
     mod=${module}
-    if [[ ${mod} == . ]]; then
+    if [[ ${mod} = \. ]]; then
       mod=root
     fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/7355288f/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 6cc64f5..2e006c1 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -581,7 +581,7 @@ function maven_reorder_module_process
   declare found
 
   for module in "${CHANGED_MODULES[@]}"; do
-    if [[ "${module}" =~ \. ]]; then
+    if [[ "${module}" = \. ]]; then
       needroot=true
     fi
   done
@@ -604,20 +604,22 @@ function maven_reorder_module_process
     for indexm in "${CHANGED_MODULES[@]}"; do
       # modules could be foo/bar, where bar is the artifactid
       # so get the basename and compare that too
-      basemod=${indexm##*/}
-      if [[ " ${module} " = " ${indexm} "
-         || " ${module} " = " ${basemod} " ]]; then
+      basemod="${indexm##*/}"
+      if [[ "${module}" = "${indexm}"
+         || "${module}" = "${basemod}" ]]; then
          yetus_debug "mrm: placing ${indexm}"
-        newlist=("${newlist[@]}" " ${indexm} ")
+        newlist=("${newlist[@]}" "${indexm}")
+        break
       fi
     done
-  done < <(${GREP} maven-enforcer "${PATCH_DIR}/maven-${repostatus}-validate-${fn}.txt" |
-    ${SED} -e 's,^.* --- .* @ \(.*\) ---$,module:\1,g' \
-    -e '/^\[INFO\]/d' )
+  done < <(${GREP} '\[INFO\]' \
+      "${PATCH_DIR}/maven-${repostatus}-validate-${fn}.txt" |
+    ${SED} -e 's,^.* --- .* @ \(.*\) ---$,module:\1,g' -e '/^\[INFO\]/d' |
+    uniq )
   popd >/dev/null
 
   if [[ "${needroot}" = true ]]; then
-    newlist=("${newlist[@]}" " . ")
+    newlist=("${newlist[@]}" ".")
   fi
 
   indexm="${#CHANGED_MODULES[@]}"
@@ -627,14 +629,15 @@ function maven_reorder_module_process
     yetus_debug "mrm: Missed a module"
     for indexm in "${CHANGED_MODULES[@]}"; do
       found=false
-      for indexn in ${newlist[*]}; do
+      for indexn in "${newlist[@]}"; do
         if [[ "${indexn}" = "${indexm}" ]]; then
           found=true
+          break
         fi
       done
       if [[ ${found} = false ]]; then
         yetus_debug "mrm: missed ${indexm}"
-        newlist=("${newlist[@]}" " ${indexm} ")
+        newlist=("${newlist[@]}" "${indexm}")
       fi
     done
   fi

http://git-wip-us.apache.org/repos/asf/yetus/blob/7355288f/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 7e93b35..53ef2f2 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -102,7 +102,7 @@ function setup_defaults
 function module_file_fragment
 {
   local mod=$1
-  if [[ ${mod} == . ]]; then
+  if [[ ${mod} = \. ]]; then
     echo root
   else
     echo "$1" | tr '/' '_' | tr '\\' '_'
@@ -1836,7 +1836,7 @@ function modules_workers
     modulesuffix=$(basename "${MODULE[${modindex}]}")
     buildtool_cwd "${modindex}"
 
-    if [[ ${modulesuffix} == . ]]; then
+    if [[ ${modulesuffix} = \. ]]; then
       modulesuffix="root"
     fi