From: Andrew Schoen Date: Wed, 28 Oct 2015 19:57:41 +0000 (-0500) Subject: get_bptag needs to be before the chacractl exists command X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b7fda0277974bf42b0743f9eb658df63e3734960;p=ceph-build.git get_bptag needs to be before the chacractl exists command without this the $dist var will not be set Signed-off-by: Andrew Schoen --- diff --git a/ceph-build-next/build/build_deb b/ceph-build-next/build/build_deb index 652ff579..021d369e 100644 --- a/ceph-build-next/build/build_deb +++ b/ceph-build-next/build/build_deb @@ -6,19 +6,6 @@ if test -f /etc/redhat-release ; then exit 0 fi -[ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test" -vers=`cat ./dist/version` -distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` -chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}" - -chacractl exists binaries/${chacra_endpoint}; exists=$? || true - -# if the binary already exists in chacra, do not rebuild -if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then - echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..." - exit 0 -fi - get_bptag() { dist=$1 @@ -41,6 +28,20 @@ get_bptag() { BPTAG=`get_bptag $DIST` +[ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test" +vers=`cat ./dist/version` +distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` +chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}" + +chacractl exists binaries/${chacra_endpoint}; exists=$? || true + +# if the binary already exists in chacra, do not rebuild +if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then + echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..." + exit 0 +fi + + HOST=$(hostname --short) echo "Building on $(hostname) Date: $(date)" echo " DIST=${DIST}"