You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by bu...@apache.org on 2016/03/30 05:33:26 UTC
[3/4] yetus git commit: YETUS-345. mvn dependency dupe fix broke
hadoop
YETUS-345. mvn dependency dupe fix broke hadoop
Signed-off-by: Sean Busbey <bu...@apache.org>
Signed-off-by: Kengo Seki <se...@apache.org>
(cherry picked from commit 7355288fee3d503442583423a0a829d5150ed118)
Conflicts:
precommit/test-patch.d/maven.sh
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/ed756631
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/ed756631
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/ed756631
Branch: refs/heads/YETUS-344
Commit: ed7566311cfb4253d9a2f29bd7d43af782b6960f
Parents: cf19ecc
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed Mar 23 10:03:32 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Tue Mar 29 21:01:22 2016 -0500
----------------------------------------------------------------------
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/ed756631/precommit/test-patch.d/checkstyle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/test-patch.d/checkstyle.sh
index 1ad657a..95c7598 100755
--- a/precommit/test-patch.d/checkstyle.sh
+++ b/precommit/test-patch.d/checkstyle.sh
@@ -367,7 +367,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/ed756631/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 91088f4..a90e959 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -607,20 +607,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=$(echo "${CHANGED_MODULES}" | wc -w)
@@ -630,14 +632,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
@@ -677,4 +680,4 @@ function maven_reorder_modules
yetus_debug "Finished list: ${CHANGED_MODULES}"
add_vote_table 0 mvndep "Maven dependency ordering for ${repostatus}"
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/yetus/blob/ed756631/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 793190a..44eaed9 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -104,7 +104,7 @@ function setup_defaults
function module_file_fragment
{
local mod=$1
- if [[ ${mod} == . ]]; then
+ if [[ ${mod} = \. ]]; then
echo root
else
echo "$1" | tr '/' '_' | tr '\\' '_'
@@ -1840,7 +1840,7 @@ function modules_workers
modulesuffix=$(basename "${MODULE[${modindex}]}")
buildtool_cwd "${modindex}"
- if [[ ${modulesuffix} == . ]]; then
+ if [[ ${modulesuffix} = \. ]]; then
modulesuffix="root"
fi