Skip to contentSkip to conversation

uninative-tarball: Fix file generation after class changes

PATCH New Richard Purdie 1 participant 3 messages May 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 uninative-tarball: Fix file generation after class changes

OE-Core rev: 57a33048a89a422cfdc986d3489c67b2d297e1e7 renamed the tar_sdk function but didn't fix this recipe. This leads to broken uninative tarballs as the internal structure isn't correct. Fix this.

---
 meta/recipes-core/meta/uninative-tarball.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/meta/uninative-tarball.bb +1 -1
index e0cb9ffee0d..34d53f9ec87 100644
@@ -57,7 +57,7 @@ fakeroot create_sdk_files() {
 }
 
 
-fakeroot tar_sdk() {
+fakeroot archive_sdk() {
 	cd ${SDK_OUTPUT}/${SDKPATH}
 
 	DEST="./${SDK_ARCH}-${SDK_OS}"
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 populate_sdk_base: Use highest compression level for xz

Whilst this may take longer to compress, it reduces network transfer and potentially extraction time so is worthwhile.

---
 meta/classes/populate_sdk_base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +1 -1
index a7f0fe74390..59920a57a76 100644
@@ -57,7 +57,7 @@ python () {
        d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
     else:
        d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz -T 0 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
+       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
 }
 
 SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 uninative-tarball: Use xz compression and SDK_ARCHIVE_CMD

In reply to Richard Purdie

Switch uninative to use xz compression instead of bzip2. We can then directly use the SDK_ARCHIVE_CMD.

---
 meta/recipes-core/meta/uninative-tarball.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/meta/uninative-tarball.bb +1 -1
index 34d53f9ec87..25635fc2f50 100644
@@ -65,5 +65,5 @@ fakeroot archive_sdk() {
 	rm sysroots -rf
 	patchelf --set-interpreter ${@''.join('a' for n in range(1024))} $DEST/usr/bin/patchelf
 	mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
-	tar ${SDKTAROPTS} -c -j --file=${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+	${SDK_ARCHIVE_CMD}
 }
Signature · 1 line
2.20.1