diff options
author | Koen Kooi <koen.kooi@linaro.org> | 2016-11-18 12:50:40 +0100 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2016-11-29 08:22:23 -0800 |
commit | 1ae5293c4ba50e81db665d15ca42379aa5b3af87 (patch) | |
tree | 48d4dad2104dcd8aaa7b5690576d22511aee778b | |
parent | a67677bdf799226670f24eb095041e38b164c67b (diff) | |
download | meta-openembedded-1ae5293c4ba50e81db665d15ca42379aa5b3af87.tar.gz |
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@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 4cd27df21d21650c8cf5468be36f33d49e4587cf)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb | 24 |
1 files 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 1769b6a8a7..a9e7d5d828 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() { | |||
108 | } | 108 | } |
109 | 109 | ||
110 | do_install() { | 110 | do_install() { |
111 | if [ grep -q "ext4_utils" "${TOOLS}" ] ; then | 111 | if echo ${TOOLS} | grep -q "ext4_utils" ; then |
112 | install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump | 112 | install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump |
113 | install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg | 113 | install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg |
114 | 114 | ||
@@ -120,22 +120,28 @@ do_install() { | |||
120 | install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} | 120 | install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} |
121 | fi | 121 | fi |
122 | 122 | ||
123 | if [ grep -q "adb " "${TOOLS}" ] ; then | 123 | if echo ${TOOLS} | grep -q "adb " ; then |
124 | install -m0755 ${B}/adb/adb ${D}${bindir}i | 124 | install -d ${D}${bindir} |
125 | install -m0755 ${B}/adb/adb ${D}${bindir} | ||
125 | fi | 126 | fi |
126 | 127 | ||
127 | if [ grep -q "adbd" "${TOOLS}" ] ; then | 128 | if echo ${TOOLS} | grep -q "adbd" ; then |
129 | install -d ${D}${bindir} | ||
128 | install -m0755 ${B}/adbd/adbd ${D}${bindir} | 130 | install -m0755 ${B}/adbd/adbd ${D}${bindir} |
129 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | ||
130 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | ||
131 | fi | 131 | fi |
132 | 132 | ||
133 | if [ grep -q "fastboot" "${TOOLS}" ] ; then | 133 | # Outside the if statement to avoid errors during do_package |
134 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | ||
135 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | ||
136 | |||
137 | if echo ${TOOLS} | grep -q "fastboot" ; then | ||
138 | install -d ${D}${bindir} | ||
134 | install -m0755 ${B}/fastboot/fastboot ${D}${bindir} | 139 | install -m0755 ${B}/fastboot/fastboot ${D}${bindir} |
135 | fi | 140 | fi |
136 | 141 | ||
137 | if [ grep -q "mkbootimg" "${TOOLS}" ] ; then | 142 | if echo ${TOOLS} | grep -q "mkbootimg" ; then |
138 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | 143 | install -d ${D}${bindir} |
144 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | ||
139 | fi | 145 | fi |
140 | } | 146 | } |
141 | 147 | ||