Update mvn snapshot dependencies in "clean" checkouts

buildall.sh saves the cdh/cdp version into .cdh/.cdp, and updates
the dependencies if this doesn't match the version from config.

This lead to updating the dependencies when switching to a different
checkout in the same directory, but didn't do this in a fresh checkout,
which could lead to build issues when the .m2 cache was dirty.

Note that this doesn't protect from switching between Impala directories
with different cdh/cdp versions.

Change-Id: I8bbde17e7c97466391aa20ac3d59c6943e7f7256
Reviewed-on: http://gerrit.cloudera.org:8080/14854
Reviewed-by: Zoltan Borok-Nagy <boroknagyz@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Laszlo Gaal <laszlo.gaal@cloudera.com>
This commit is contained in:
Csaba Ringhofer
2019-12-05 20:18:56 +01:00
parent f33a9d0d42
commit 4093975e2d

View File

@@ -547,11 +547,10 @@ bootstrap_dependencies
# local cache.
CDH_FILE="${IMPALA_HOME}/.cdh"
CDP_FILE="${IMPALA_HOME}/.cdp"
if [[ -f ${CDH_FILE} && -f ${CDP_FILE} ]]; then
if [[ $(cat ${CDH_FILE}) != ${CDH_BUILD_NUMBER} || \
$(cat ${CDP_FILE}) != ${CDP_BUILD_NUMBER} ]]; then
export IMPALA_MAVEN_OPTIONS="${IMPALA_MAVEN_OPTIONS} -U"
fi
if [[ ! -f ${CDH_FILE} || ! -f ${CDP_FILE} || \
$(cat ${CDH_FILE}) != ${CDH_BUILD_NUMBER} || \
$(cat ${CDP_FILE}) != ${CDP_BUILD_NUMBER} ]]; then
export IMPALA_MAVEN_OPTIONS="${IMPALA_MAVEN_OPTIONS} -U"
fi
echo "${CDH_BUILD_NUMBER}" > ${CDH_FILE}
echo "${CDP_BUILD_NUMBER}" > ${CDP_FILE}