summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/rfkill
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-11-15 22:02:26 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2013-11-18 23:14:27 +0100
commit8155e22cdd7ec20997124989bd8875159130030c (patch)
treea35d0553d5fc3cd34894fbda0091fb5c71c94ad0 /meta-oe/recipes-connectivity/rfkill
parent504133a737161be421de0a85500b02012ddb0813 (diff)
downloadmeta-openembedded-8155e22cdd7ec20997124989bd8875159130030c.tar.gz
rfkill: Fix build when WORKDIR is included in some git checkout
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/rfkill')
-rw-r--r--meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch31
-rw-r--r--meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb3
2 files changed, 33 insertions, 1 deletions
diff --git a/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch b/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch
new file mode 100644
index 000000000..2b8368912
--- /dev/null
+++ b/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch
@@ -0,0 +1,31 @@
1When WORKDIR is included in some other git checkout, version.sh calls git rev-parse
2and it returns some description from that upper git checkout even when rfkill is
3being built from release tarball.
4
5When returned description doesn't match with expected v0.4, version.sh exits
6without creating version.c
7 # on git builds check that the version number above
8 # is correct...
9 [ "${descr%%-*}" = "v$VERSION" ] || exit 2
10
11and build fails a bit later:
12 | NOTE: make -j 32 -e MAKEFLAGS=
13 | CC rfkill.o
14 | GEN version.c
15 | make: *** [version.c] Error 2
16 | make: *** Waiting for unfinished jobs....
17 | ERROR: oe_runmake failed
18
19Don't try git rev-parse, if there isn't .git in ${S}.
20
21--- a/version.sh 2013-11-15 03:43:12.587744366 -0800
22+++ b/version.sh 2013-11-15 03:42:40.699743320 -0800
23@@ -12,7 +12,7 @@
24
25 if test "x$SUFFIX" != 'x'; then
26 v="$VERSION$SUFFIX"
27-elif head=`git rev-parse --verify HEAD 2>/dev/null`; then
28+elif test -d .git && head=`git rev-parse --verify HEAD 2>/dev/null`; then
29 git update-index --refresh --unmerged > /dev/null
30 descr=$(git describe 2>/dev/null || echo "v$VERSION")
31
diff --git a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
index f90736dff..1c2930a5c 100644
--- a/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
+++ b/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c6036d0eb7edbfced28c4160e5d3fa94"
6PR = "r1" 6PR = "r1"
7 7
8SRC_URI = "http://wireless.kernel.org/download/${PN}/${P}.tar.bz2 \ 8SRC_URI = "http://wireless.kernel.org/download/${PN}/${P}.tar.bz2 \
9 file://0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch" 9 file://0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch \
10 file://dont.call.git.rev-parse.on.parent.dir.patch"
10 11
11SRC_URI[md5sum] = "727892c0fb35c80ee3849fbe89b45350" 12SRC_URI[md5sum] = "727892c0fb35c80ee3849fbe89b45350"
12SRC_URI[sha256sum] = "ca10e4827a5f0a36e093aee6ad81b5febf81f8097d7d858889ac51ff364168c1" 13SRC_URI[sha256sum] = "ca10e4827a5f0a36e093aee6ad81b5febf81f8097d7d858889ac51ff364168c1"