diff mbox series

populate_sdk_base: remove 7zip support

Message ID 20261204172203.2881301-1-ross.burton@arm.com
State New
Headers show
Series populate_sdk_base: remove 7zip support | expand

Commit Message

Ross Burton Dec. 4, 2026, 5:22 p.m. UTC
This was quite broken, I started to fix it but it doesn't look like it
ever actually worked. From trivial to fatal:

- The error message if you set an invalid SDK_ARCHIVE_TYPE says "7z" but
  the correct value is "7zip"
- 7zip isn't told to follow links, so best-case it duplicated files but
  also dangling links (as are in parts of the sysroot) cause failure
- The temporary archive is a .7z file, but the self-extracting wrapper
  creation looked for .7zip
- The SDK unpack code didn't handle 7z and tried to use tar+xz.

This code is untested and broken, so remove it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes-recipe/populate_sdk_base.bbclass | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 35d2f203399..906ae94787c 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -92,8 +92,6 @@  SDK_ARCHIVE_TYPE ?= "tar.xz"
 SDK_XZ_COMPRESSION_LEVEL ?= "-9"
 SDK_XZ_OPTIONS ?= "${XZ_DEFAULTS} ${SDK_XZ_COMPRESSION_LEVEL}"
 SDK_ZIP_OPTIONS ?= "-y"
-SDK_7ZIP_OPTIONS ?= "-mx=9 -mm=BZip2"
-SDK_7ZIP_TYPE ?= "7z"
 SDK_ZSTD_COMPRESSION_LEVEL ?= "-17"
 
 # To support different sdk type according to SDK_ARCHIVE_TYPE, now support zip and tar.xz
@@ -103,9 +101,6 @@  python () {
        # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}
        # recommand to cd into input dir first to avoid archive with buildpath
        d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
-    elif d.getVar('SDK_ARCHIVE_TYPE') == '7zip':
-       d.setVar('SDK_ARCHIVE_DEPENDS', '7zip-native')
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; 7za a -r ${SDK_7ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_7ZIP_TYPE} .')
     elif d.getVar('SDK_ARCHIVE_TYPE') == 'tar.zst':
        d.setVar('SDK_ARCHIVE_DEPENDS', 'zstd-native')
        d.setVar('SDK_ARCHIVE_CMD',
@@ -115,7 +110,7 @@  python () {
        d.setVar('SDK_ARCHIVE_CMD',
          'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
     else:
-        bb.fatal("Invalid SDK_ARCHIVE_TYPE: %s, the supported SDK archive types are: zip, 7z, tar.xz, tar.zst" % d.getVar('SDK_ARCHIVE_TYPE'))
+        bb.fatal("Invalid SDK_ARCHIVE_TYPE: %s, the supported SDK archive types are: zip, tar.xz, tar.zst" % d.getVar('SDK_ARCHIVE_TYPE'))
 }
 
 SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"