]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: use the check_binary_existence method 228/head
authorAndrew Schoen <aschoen@redhat.com>
Mon, 16 Nov 2015 23:00:29 +0000 (17:00 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 16 Nov 2015 23:07:57 +0000 (16:07 -0700)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build/build/build_deb
ceph-build/build/build_rpm

index 8fc2945d3e2da417fb548a943131d31a3486db9d..e541b012015641086b327ed48f93747db09b47ba 100644 (file)
@@ -35,14 +35,8 @@ vers=`cat ./dist/version`
 distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
 chacra_endpoint="ceph/${chacra_ref}/${distro}/${DIST}/${ARCH}"
 
-$VENV/chacractl exists binaries/${chacra_endpoint} ; exists=$?
-
-# if the binary already exists in chacra, do not rebuild
-if [ $exists -eq 0 ] && [ "$FORCE" = false ] ; then
-    echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
-    exit 0
-fi
-
+# this exists in scripts/build_utils.sh
+check_binary_existence $chacra_endpoint
 
 HOST=$(hostname --short)
 echo "Building on $(hostname) Date: $(date)"
index df030fb54a5ca3d7f6f49e3d65531746015370b8..b0956587a73c53fe5748aed2b6f786e9588327d1 100644 (file)
@@ -61,13 +61,8 @@ vers=`cat ./dist/version`
 [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
 chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
 
-$VENV/chacractl exists binaries/${chacra_baseurl}/${ARCH} ; exists=$?
-
-# if the binary already exists in chacra, do not rebuild
-if [ $exists -eq 0 ] && [ "$FORCE" = false ]; then
-    echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists and FORCE was not set, Exiting..."
-    exit 0
-fi
+# this exists in scripts/build_utils.sh
+check_binary_existence $chacra_baseurl/$ARCH
 
 HOST=$(hostname --short)
 echo "Building on $(hostname) Date: $(date)"