Skip to contentSkip to conversation

arm-systemready: WORKDIR to UNPACKDIR changes

PATCH Applied Jon Mason 2 participants 2 messages Jul 1, 2024 – Jul 2, 2024

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 arm-systemready: WORKDIR to UNPACKDIR changes

Recent upstream changes to what is acceptable use of WORKDIR have broken where the meta-arm-systemready recipes are expecting things to be. Fix them to point to the correct location.

---
 .../classes/arm-systemready-acs.bbclass                | 10 +++++-----
 .../arm-systemready-acs/arm-systemready-ir-acs.bb      |  2 ++
 .../arm-systemready-linux-distros.inc                  |  4 +++-
 3 files changed, 10 insertions(+), 6 deletions(-)
meta-arm-systemready/classes/arm-systemready-acs.bbclass +5 -5
index 9dc3635dcdf4..d817b693215b 100644
@@ -29,7 +29,7 @@ IMAGE_POSTPROCESS_COMMAND += "write_image_test_data; "
 python do_deploy() {
     deploydir = d.getVar('DEPLOYDIR')
     suffix = d.getVar('IMAGE_DEPLOY_SUFFIX')
-    imgfile = os.path.join(d.getVar('WORKDIR'), d.getVar('IMAGE_FILENAME'))
+    imgfile = os.path.join(d.getVar('UNPACKDIR'), d.getVar('IMAGE_FILENAME'))
     deployfile = os.path.join(deploydir, d.getVar('IMAGE_NAME') + suffix)
     linkfile = os.path.join(deploydir, d.getVar('IMAGE_LINK_NAME') + suffix)
 
@@ -47,14 +47,14 @@ python do_deploy() {
 
     # Copy the report.txt to DEPLOYDIR
     # The machine-specific implementation can optionally put the report file in
-    # ${WORKDIR}/report.txt. If there is no such file present, use the template.
-    workdir = d.getVar('WORKDIR')
-    report_file = os.path.join(workdir, "report.txt")
+    # ${UNPACKDIR}/report.txt. If there is no such file present, use the template.
+    unpackdir = d.getVar('UNPACKDIR')
+    report_file = os.path.join(unpackdir, "report.txt")
     report_file_dest = os.path.join(deploydir, "report.txt")
     if os.path.exists(report_file):
         report_file_to_copy = report_file
     else:
-        report_file_to_copy = os.path.join(workdir, "systemready-ir-template",
+        report_file_to_copy = os.path.join(unpackdir, "systemready-ir-template",
                                             "report.txt")
     shutil.copyfile(report_file_to_copy, report_file_dest)
 
meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb +2 -0
index 41ac2f77598b..7a709af5e267 100644
@@ -58,4 +58,6 @@ SRC_URI[acs-img.sha256sum] = "ea52f84dab44bde97de3e2d2224d883acaae35724dd8e2bdfb
 # Revision pointing to v2023.04 tag
 SRCREV_sr-ir-template = "c714db178ddf72e5ae5017f15421095297d5bf0e"
 
+S = "${WORKDIR}/sources-unpack"
+
 inherit arm-systemready-acs
meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros.inc +3 -1
index d80cf2373ec6..24dfc50a9b24 100644
@@ -22,6 +22,8 @@ ARM_SYSTEMREADY_LINUX_DISTRO_ISO_IMAGE = \
 # Size of installation disk in MB
 ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE ?= "4096"
 
+S = "${WORKDIR}/sources-unpack"
+
 do_image() {
     dd if=/dev/zero of=${WORKDIR}/${IMAGE_LINK_NAME}.wic \
         bs=1M count=${ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE} status=none
@@ -29,7 +31,7 @@ do_image() {
 
 do_deploy() {
     # Deploy the iso and installation target disk image to the deploy folder
-    install -m 644 ${WORKDIR}/${ISO_IMAGE_NAME}.iso ${DEPLOYDIR}
+    install -m 644 ${UNPACKDIR}/${ISO_IMAGE_NAME}.iso ${DEPLOYDIR}
     install -m 644 ${WORKDIR}/${IMAGE_LINK_NAME}.wic ${DEPLOYDIR}
 }
 
Signature · 1 line
2.39.3 (Apple Git-146)
Applied
#1 lore raw
Quoted 5 lines · Jon Mason

Recent upstream changes to what is acceptable use of WORKDIR have broken where the meta-arm-systemready recipes are expecting things to be. Fix them to point to the correct location.

Applied, thanks!

[1/1] arm-systemready: WORKDIR to UNPACKDIR changes

      commit: 1d65894556c93c4cddc1a34f27b151e890ee061a

Best regards,

Signature · 1 line
Jon Mason <[email protected]>