Skip to contentSkip to conversation

android-tools-configfs: Fix build-time warning about S being non-existent

PATCH In review Dmitry Baryshkov 2 participants 2 messages May 28, 2024 – May 30, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 android-tools-configfs: Fix build-time warning about S being non-existent

android-tools-configfs doesn't have any checked out source files, which results in a warning regarding S not existing. Fix the warning by pointing S to ${WORKDIR}/sources and UNPACKDIR to ${S}.

The warning text:

WARNING: android-tools-conf-configfs-1.0-r0 do_unpack:
android-tools-conf-configfs: the directory ${WORKDIR}/${BP} (<scrubbed>) pointed to by the S variable doesn't exist - please set S within the recipe to point to where the source has been unpacked to

---

Changes since v1:
- Follow S = ${WORKDIR}/sources and UNPACKDIR = ${S} as it's done everywhere else (Khem Raj)

---
 .../android-tools/android-tools-conf-configfs_1.0.bb           | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb +3 -0
index 430b53c4d0cf..a91229f90878 100644
@@ -3,6 +3,9 @@ SECTION = "console/utils"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
 SRC_URI = " \
     file://android-gadget-setup \
     file://android-gadget-start \
Signature · 1 line
2.39.2
#1 lore raw

Hi,

I believe similar recipe updates in e.g. oe-core also update do_install() and friends to reference S again instead of UNPACKDIR, i.e. something like the following should also be done to be consistent (sorry for the formatting):

 do_install() {
     install -d ${D}${bindir}
-    install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
-    install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
-    install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
+    install -m 0755 ${S}/android-gadget-setup ${D}${bindir}
+    install -m 0755 ${S}/android-gadget-start ${D}${bindir}
+    install -m 0755 ${S}/android-gadget-cleanup ${D}${bindir}

- if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
+ if [ -r ${S}/android-gadget-setup.machine ] ; then
install -d ${D}${sysconfdir}
- install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
+ install -m 0644 ${S}/android-gadget-setup.machine ${D}${sysconfdir}

     fi
 
     install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d

- install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
+ install -m 0644 ${S}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
}

Cheers,
Andre'