Bug #2173

[patch] version number picks up unrelated git describe

Added by ncopa about 4 years ago. Updated almost 4 years ago.

Status:FixedStart date:2010-03-12
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-Estimated time:0.10 hour
Target version:1.4.27
Missing in 1.5.x:No

Description

The build scripts for my alpine-linux distro are in git. When building lighttpd it picks up the git description tag for the distro build scripts and says lighttpd is a development version.

Fix is easy, just check if there is a .git dir in $top_srcdir like you do with svn.

ncdev:~/src/lighttpd-1.4.x$ svn diff
Index: src/Makefile.am
===================================================================
--- src/Makefile.am    (revision 2717)
+++ src/Makefile.am    (working copy)
@@ -19,7 +19,7 @@
             REVISION=""; \
         fi; \
     fi; \
-    if test -z "$$REVISION" -a -x "`which git`"; then \
+    if test -z "$$REVISION" -a -d "$(top_srcdir)/.git" -a -x "`which git`"; then \
         REVISION="$$(cd "$(top_srcdir)"; LANG= LC_ALL=C git describe --always 2>/dev/null || echo)"; \
     fi; \
     if test -n "$$REVISION"; then \

reference: http://redmine.alpinelinux.org/issues/323

Thanks!

Associated revisions

Revision 2722
Added by stbuehler almost 4 years ago

Fix detecting git repository (fixes #2173, thx ncopa)

History

#1 Updated by stbuehler almost 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2722.

Also available in: Atom