Skip to contentSkip to conversation

android-tools: fix package split

PATCH New Dmitry Baryshkov 1 participant 2 messages Dec 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 android-tools: fix package split

"${PN}-fstools" was added to the end of PACKAGES list, so it received no files. Move the package name to the beginning of PACKAGES list to fix packages split ending up with non-empty android-tools-fstools package.

---
 .../android-tools/android-tools_5.1.1.r37.bb                 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +3 -2
index fb6125e2a5df..fea4f7eba11d 100644
@@ -157,9 +157,10 @@ do_install() {
     fi
 }
 
-PACKAGES += "${PN}-fstools"
+PACKAGES =+ "${PN}-fstools"
 
-RDEPENDS_${BPN} = "${BPN}-conf bash"
+RDEPENDS_${BPN} = "${BPN}-conf"
+RDEPENDS_${BPN}-fstools = "bash"
 
 FILES_${PN}-fstools = "\
     ${bindir}/ext2simg \
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/2 android-tools: split adbd to the separate package

Usually one would install adbd on a device, where adb and mkbootimg are of little use. Split adbd to the separate package.

---
 .../android-tools/android-tools_5.1.1.r37.bb         | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +9 -3
index fea4f7eba11d..ae1463942a1d 100644
@@ -67,7 +67,8 @@ COMPATIBLE_HOST_powerpc64le = "(null)"
 
 inherit systemd
 
-SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service"
+SYSTEMD_PACKAGES = "${PN}-adbd"
+SYSTEMD_SERVICE_${PN}-adbd = "android-tools-adbd.service"
 
 # Find libbsd headers during native builds
 CC_append_class-native = " -I${STAGING_INCDIR}"
@@ -157,11 +158,16 @@ do_install() {
     fi
 }
 
-PACKAGES =+ "${PN}-fstools"
+PACKAGES =+ "${PN}-fstools ${PN}-adbd"
 
-RDEPENDS_${BPN} = "${BPN}-conf"
+RDEPENDS_${BPN}-adbd = "${BPN}-conf"
 RDEPENDS_${BPN}-fstools = "bash"
 
+FILES_${PN}-adbd = "\
+    ${bindir}/adbd \
+    ${systemd_unitdir}/system/android-tools-adbd.service \
+"
+
 FILES_${PN}-fstools = "\
     ${bindir}/ext2simg \
     ${bindir}/ext4fixup \
Signature · 1 line
2.29.2