From b7fda0277974bf42b0743f9eb658df63e3734960 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 28 Oct 2015 14:57:41 -0500 Subject: [PATCH] get_bptag needs to be before the chacractl exists command without this the $dist var will not be set Signed-off-by: Andrew Schoen --- ceph-build-next/build/build_deb | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) 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}" -- 2.39.5