]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-setup: move the git diff check before calling autogen.sh 596/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 14 Dec 2016 19:05:20 +0000 (14:05 -0500)
committerAlfredo Deza <adeza@redhat.com>
Wed, 14 Dec 2016 19:27:56 +0000 (14:27 -0500)
Fixes: http://tracker.ceph.com/issues/17901
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-setup/build/build

index ebee6dad4c3176b352376ed6e63e44c7bff5ea22..86c421c2a8e7ab2d0e70c61bee6dc519ffa57aaa 100644 (file)
@@ -53,6 +53,28 @@ else
     export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
 fi
 
+
+# When using autotools/autoconf it is possible to see output from `git diff`
+# since some macros can be copied over to the ceph source, triggering this
+# check. This is why this check now is done just before running autogen.sh
+# which calls `aclocal -I m4 --install` that copies a system version of
+# ltsugar.m4 that can be different from the one included in the ceph source
+# tree.
+if git diff --quiet ; then
+    echo repository is clean
+else
+    echo
+    echo "**** REPOSITORY IS DIRTY ****"
+    echo
+    git diff
+    if [ "$force" != "force" ]; then
+       echo "add 'force' argument if you really want to continue."
+       exit 1
+    fi
+    echo "forcing."
+fi
+
+
 # make-dist does not exist for autotools builds
 if [ ! -x make-dist ]; then
     echo "Using autotools build system"
@@ -87,20 +109,6 @@ mkdir -p release
 releasedir='release'
 versionfile='release/version'
 
-if git diff --quiet ; then
-    echo repository is clean
-else
-    echo
-    echo "**** REPOSITORY IS DIRTY ****"
-    echo
-    git diff
-    if [ "$force" != "force" ]; then
-       echo "add 'force' argument if you really want to continue."
-       exit 1
-    fi
-    echo "forcing."
-fi
-
 cephver=`git describe --match "v*" | sed s/^v//`
 echo current version $cephver