1 |
commit: 67bcfe4cf1874a8571255a9612da75c5c9d1afde |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 1 19:49:21 2016 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 1 19:49:21 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=67bcfe4c |
7 |
|
8 |
Make configure test for git more robust. |
9 |
|
10 |
* configure.ac: Make testing for git repository more robust. |
11 |
|
12 |
ChangeLog | 2 ++ |
13 |
configure.ac | 2 +- |
14 |
2 files changed, 3 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/ChangeLog b/ChangeLog |
17 |
index c166ad0..087baae 100644 |
18 |
--- a/ChangeLog |
19 |
+++ b/ChangeLog |
20 |
@@ -1,5 +1,7 @@ |
21 |
2016-06-01 Ulrich Müller <ulm@g.o> |
22 |
|
23 |
+ * configure.ac: Make testing for git repository more robust. |
24 |
+ |
25 |
* configure.ac: Where possible, use AC_CHECK_PROGS instead of |
26 |
AC_PATH_PROGS, in order to avoid absolute paths, bug 122260. |
27 |
* libs/core.bash.in (sed): |
28 |
|
29 |
diff --git a/configure.ac b/configure.ac |
30 |
index 6fce662..9a72546 100644 |
31 |
--- a/configure.ac |
32 |
+++ b/configure.ac |
33 |
@@ -73,7 +73,7 @@ AC_SUBST(EPREFIX) |
34 |
AC_MSG_CHECKING([whether building from git]) |
35 |
EXTRAVERSION="" |
36 |
eselect_git_dir=${GIT_DIR:-${srcdir}/.git} |
37 |
-if test -d "${eselect_git_dir}"; then |
38 |
+if GIT_DIR="${eselect_git_dir}" git rev-parse >/dev/null 2>&1; then |
39 |
COMMIT=`GIT_DIR="${eselect_git_dir}" git describe --long --always HEAD` |
40 |
if test x$COMMIT != x; then |
41 |
EXTRAVERSION=", git commit $COMMIT" |