[oe-commits] [meta-openembedded] 60/69: android-tools: fix do_install

git at git.openembedded.org git at git.openembedded.org
Tue Dec 13 10:15:07 UTC 2016


martin_jansa pushed a commit to branch morty-next
in repository meta-openembedded.

commit 1ae5293c4ba50e81db665d15ca42379aa5b3af87
Author: Koen Kooi <koen.kooi at linaro.org>
AuthorDate: Fri Nov 18 12:50:40 2016 +0100

    android-tools: fix do_install
    
    The previous patch introduced 2 bugs that made packaging fail:
    
    1) Always failing grep
    2) Conditionally install systemd files
    
    Systemd.bbclass doesn't handle conditional installation and will throw an error.
    
    Tested with -native and regular cross builds.
    
    Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    (cherry picked from commit 4cd27df21d21650c8cf5468be36f33d49e4587cf)
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 .../android-tools/android-tools_5.1.1.r37.bb       | 24 ++++++++++++++--------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index 1769b6a..a9e7d5d 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -108,7 +108,7 @@ do_compile() {
 }
 
 do_install() {
-    if [ grep -q "ext4_utils" "${TOOLS}" ] ; then
+    if echo ${TOOLS} | grep -q "ext4_utils" ; then
         install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump
         install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg
 
@@ -120,22 +120,28 @@ do_install() {
         install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir}
     fi
 
-    if [ grep -q "adb " "${TOOLS}" ] ; then
-        install -m0755 ${B}/adb/adb ${D}${bindir}i
+    if echo ${TOOLS} | grep -q "adb " ; then
+        install -d ${D}${bindir}
+        install -m0755 ${B}/adb/adb ${D}${bindir}
     fi
 
-    if [ grep -q "adbd" "${TOOLS}" ] ; then
+    if echo ${TOOLS} | grep -q "adbd" ; then
+        install -d ${D}${bindir}
         install -m0755 ${B}/adbd/adbd ${D}${bindir}
-        install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \
-          ${D}${systemd_unitdir}/system/android-tools-adbd.service
     fi
 
-    if [ grep -q "fastboot" "${TOOLS}" ] ; then
+    # Outside the if statement to avoid errors during do_package
+    install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \
+      ${D}${systemd_unitdir}/system/android-tools-adbd.service
+
+    if echo ${TOOLS} | grep -q "fastboot" ; then
+        install -d ${D}${bindir}
         install -m0755 ${B}/fastboot/fastboot ${D}${bindir}
     fi
 
-    if [ grep -q "mkbootimg" "${TOOLS}" ] ; then
-         install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir}
+    if echo ${TOOLS} | grep -q "mkbootimg" ; then
+        install -d ${D}${bindir}
+        install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir}
     fi
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list