Re: do_unpack() ISO Image

Richard Purdie

On Thu, 2020-09-17 at 20:09 -0700, Chuck Wolber wrote:

Hi all,

I have a need to unpack an ISO image during do_unpack. This does not
appear to be one of the extensions that is handled by default, so I
am working out a way to use xorriso to do this for me.

I can get this to work in the following way, but it involves calling
an executable running on the build host, which only works by luck
since the host executable is the same architecture as what I am
currently building. I would like to do this in a portable way that
does not break when I try to build for a different architecture.

DEPENDS += "xorriso"

do_unpack_append() {'unpack_iso', d)

unpack_iso() {
/usr/bin/xorriso -osirrox on -indev ${WORKDIR}/${PN}_${PV}.iso
-extract / ${S}

From looking at base.bbclass, it _seems_ as if my solution involves
something like this:

d.appendVarFlag('do_unpack', 'depends', '

But it is unclear exactly where that would go within my recipe. Any
You can do the same thing with:

do_unpack[depends] += " xorriso:do_populate_sysroot"

but note that you want xorriso-native, not xorriso.



Join to automatically receive all group messages.