Skip to contentSkip to conversation

do_unpack:append() with dependencies

DISCUSSION H. Wulff 3 participants 4 messages Jun 19, 2025

lore
Share & tools
lore

H. Wulff

author
#0 lore raw

Hi,

I've a custom command for unpack with dependency. My first try looked like this:

```
do_unpack[depends] = "xorriso-native:do_populate_sysroot"

do_unpack() {
    xorriso \
        -osirrox on \
        -indev ${DL_DIR}/$(basename ${ISO}) \
        -extract / ${S}
}
```
Then I recognize that our custom files no longer being copied to `${WORKDIR}`.
So I modified the unpack task to:
```
do_unpack:append() {
    xorriso \
        -osirrox on \
        -indev ${DL_DIR}/$(basename ${ISO}) \
        -extract / ${S}
}
```
Then I get wired exceptions like
```
Exception during build_dependencies for do_unpack
```

I don't see what's wrong.

So what the correct way to have a do_unpack:append() with dependencies?

Thank you.

#1 lore raw
Quoted 20 lines · H. Wulff via lists.yoctoproject.org

Hi,
I've a custom command for unpack with dependency. My first try looked like this:
do_unpack[depends] = "xorriso-native:do_populate_sysroot"

do_unpack() {
xorriso \

(quoted diff) +0 -3
-osirrox on \
-indev ${DL_DIR}/$(basename ${ISO}) \
-extract / ${S}

}

Then I recognize that our custom files no longer being copied to ${WORKDIR}. So I modified the unpack task to:
do_unpack:append() {
xorriso \

(quoted diff) +0 -3
-osirrox on \
-indev ${DL_DIR}/$(basename ${ISO}) \
-extract / ${S}

}

Quoted 5 lines

Then I get wired exceptions like
Exception during build_dependencies for do_unpack

I don't see what's wrong.
So what the correct way to have a do_unpack:append() with dependencies?

The default do_unpack() is a Python function, and you’re appending invalid python (because it’s shell) so the parse fails.

The neatest thing to do here would be either adding iso unpacking support to bitbake itself, or to change your unpack code to be a postfunc:

unpack_iso() {
xorriso …
}
do_unpack[depends] = "xorriso-native:do_populate_sysroot” do_unpack[postfuncs] += “unpack_iso”

Ross

author
#2 lore raw

Hi!

Thanks for your reply. You're right, it works now.

Quoted 1 line

The neatest thing to do here would be either adding iso unpacking support to bitbake itself

I was thinking about this, but I couldn't find a starting point in the documentation. Do you've a starting point for me? Documentation or file would help.

Thank you.

#3 lore raw
Quoted 3 lines · H. Wulff via lists.yoctoproject.org

The neatest thing to do here would be either adding iso unpacking support to bitbake itself

I was thinking about this, but I couldn't find a starting point in the documentation. Do you've a starting point for me? Documentation or file would help.

The file is bitbake/lib/bb/fetch2/__init__.py, look for def unpack.

Alex