do_unpack:append() with dependencies
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.
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 duringbuild_dependenciesfordo_unpackI 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
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.
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