Fix kernel-devsrc package failing during install 09/11209/3 4.0.2 dab/4.0.2 dab_4.0.2
authorStephane Desneux <stephane.desneux@iot.bzh>
Tue, 10 Oct 2017 17:25:59 +0000 (19:25 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 11 Oct 2017 14:24:55 +0000 (14:24 +0000)
This issue is due to the upstream script hardcodes /bin/awk whereas we ship /usr/bin/awk.
The installation check will break in this case. Fix it by changing the path in the script.

References:
- https://lists.yoctoproject.org/pipermail/meta-intel/2017-January/004519.html
- https://patchwork.openembedded.org/patch/136699/
- http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/commit/?h=yocto-4.9&id=d0e0a36eec57f5dfa02045776c69092c145f5000

Bug-AGL: SPEC-933

Change-Id: I228351663b764378960051463086e32c81b9b3d2
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11209
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Romain Forlot <romain.forlot@iot.bzh>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Thomas Rini <trini@konsulko.com>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend [new file with mode: 0644]

diff --git a/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend b/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend
new file mode 100644 (file)
index 0000000..406aad1
--- /dev/null
@@ -0,0 +1,7 @@
+
+do_install_append() {
+    # enforce all scripts to use /usr/bin/awk . This fixes the rpm dependency failure on install of kernel-devsrc
+    cd ${D} || true
+       ( for i in `grep -srI "\!/bin/awk" | cut -d":" -f1 ` ; do sed -i -e "s#\!/bin/awk#\!/usr/bin/env awk#g" $i ; done ) || true
+}
+