Skip to contentSkip to conversation

Copy file from ZIP archive to image

DISCUSSION Daniel Kampert 2 participants 3 messages Mar 12, 2025 – Mar 13, 2025

lore
Share & tools
lore
#0 lore raw

I have a ZIP archive with some media, html and JSON files and I want to copy them with this recipe

SUMMARY = "Frontend application"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = " \
file://${WORKDIR}/LICENSE;md5=03fe683ef28b9ddfe7f658a0f4b3b80e \
"
SRC_URI = " \
file://LICENSE \
file://frontend.zip \
"
do_install () {
install -d ${D}/opt/app/frontend
cp -r ${WORKDIR}/build/* ${D}/opt/app/frontend
}
FILES_${PN} += "/opt/app/frontend/*"

But I get these errors

ERROR: frontend-1.0-r0 do_package: Fatal errors occurred in subprocesses:
'utf-8' codec can't decode byte 0x9a in position 619: invalid start byte: Traceback (most recent call last):
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/utils.py", line 280, in run ret = self._target(*self._args, **self._kwargs)
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/package.py", line 251, in filedeprunner output = subprocess.check_output(shlex.split(rpmdeps) + pkgfiles, stderr=subprocess.STDOUT).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 619: invalid start byte

How can I fix them?

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de

#1 lore raw

I have 2 thoughts which may or may not be worthless:

1. Are there any non-US-ASCII characters in any of the filenames in your zip archive? If yes, can you change them, and try again?

2. If #1leads nowhere, try to add some print() statements to meta/lib/oe/package.py, just before the failing subprocess call. Try to capture the executed command and its output, and see if it sheds some light at the issue.

Quoted 54 lines · Daniel Kampert via lists.yoctoproject.org

I have a ZIP archive with some media, html and JSON files and I want to copy them with this recipe

SUMMARY = "Frontend application"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = " \
file://${WORKDIR}/LICENSE;md5=03fe683ef28b9ddfe7f658a0f4b3b80e \
"
SRC_URI = " \
file://LICENSE \
file://frontend.zip \
"
do_install () {
  install -d ${D}/opt/app/frontend
  cp -r ${WORKDIR}/build/* ${D}/opt/app/frontend
}
FILES_${PN} += "/opt/app/frontend/*"

But I get these errors

ERROR: frontend-1.0-r0 do_package: Fatal errors occurred in subprocesses:
'utf-8' codec can't decode byte 0x9a in position 619: invalid start
byte: Traceback (most recent call last):
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/utils.py", line 280, in run
ret = self._target(*self._args, **self._kwargs)
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/package.py", line 251, in filedeprunner
output = subprocess.check_output(shlex.split(rpmdeps) + pkgfiles, stderr=subprocess.STDOUT).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 619: invalid start byte

How can I fix them?

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de <https://www.daniel-kampert.de>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64945): https://lists.yoctoproject.org/g/yocto/message/64945
Mute This Topic: https://lists.yoctoproject.org/mt/111662118/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Gyorgy,

thanks for the answer. The issue is gone after unzipping and adding the files directly. This solves the issue.

Quoted 63 lines

Gyorgy Sarvari via lists.yoctoproject.org <[email protected]> hat am 13.03.2025 09:21 CET geschrieben:

I have 2 thoughts which may or may not be worthless:

1. Are there any non-US-ASCII characters in any of the filenames in your zip archive? If yes, can you change them, and try again?

2. If #1leads nowhere, try to add some print() statements to meta/lib/oe/package.py, just before the failing subprocess call. Try to capture the executed command and its output, and see if it sheds some light at the issue.

Quoted 37 lines · Daniel Kampert via lists.yoctoproject.org

I have a ZIP archive with some media, html and JSON files and I want to copy them with this recipe

SUMMARY = "Frontend application"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = " \
file://${WORKDIR}/LICENSE;md5=03fe683ef28b9ddfe7f658a0f4b3b80e \
"
SRC_URI = " \
file://LICENSE \
file://frontend.zip \
"
do_install () {
  install -d ${D}/opt/app/frontend
  cp -r ${WORKDIR}/build/* ${D}/opt/app/frontend
}
FILES_${PN} += "/opt/app/frontend/*"

But I get these errors

ERROR: frontend-1.0-r0 do_package: Fatal errors occurred in subprocesses:
'utf-8' codec can't decode byte 0x9a in position 619: invalid start
byte: Traceback (most recent call last):
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/utils.py", line 280, in run
ret = self._target(*self._args, **self._kwargs)
File "/BSP5/os/build/../layers/openembedded-core/meta/lib/oe/package.py", line 251, in filedeprunner
output = subprocess.check_output(shlex.split(rpmdeps) + pkgfiles, stderr=subprocess.STDOUT).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 619: invalid start byte

How can I fix them?

Quoted 11 lines

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de <https://www.daniel-kampert.de>

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64947): https://lists.yoctoproject.org/g/yocto/message/64947
Mute This Topic: https://lists.yoctoproject.org/mt/111662118/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)