summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
blob: 715b88d46672e1bb18d6358e400c0959bc85dcf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Subject: [PATCH] iw: version.sh: don't use git describe for versioning

It will detect top-level git repositories like the Angstrom setup-scripts and break.

Upstream-Status: Pending

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
diff -Naur iw-4.7-orig/version.sh iw-4.7/version.sh
--- iw-4.7-orig/version.sh	2016-05-31 12:52:46.000000000 +0300
+++ iw-4.7/version.sh	2016-06-01 11:21:58.307409060 +0300
@@ -15,27 +15,7 @@
 SRC_DIR=$(cd ${SRC_DIR}; pwd)
 cd "${SRC_DIR}"
 
-v=""
-if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
-    git update-index --refresh --unmerged > /dev/null
-    descr=$(git describe --match=v* 2>/dev/null)
-    if [ $? -eq 0 ]; then
-        # on git builds check that the version number above
-        # is correct...
-        if [ "${descr%%-*}" = "v$VERSION" ]; then
-            v="${descr#v}"
-            if git diff-index --name-only HEAD | read dummy ; then
-                v="$v"-dirty
-            fi
-        fi
-    fi
-fi
-
-# set to the default version when failed to get the version
-# information with git
-if [ -z "${v}" ]; then
-    v="$VERSION"
-fi
+v="$VERSION"
 
 echo '#include "iw.h"' > "$OUT"
 echo "const char iw_version[] = \"$v\";" >> "$OUT"