Writing do_install_append for target and virtclass-native in a bbappend
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:
do_install_append_virtclass-native() {
:
}function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native do_install_append() and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.
I figure I must be missing something rather fundamental here. Any ideas what it might be?
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 11 lines · On Monday 16 April 2012 20:32:25 Darren Hart wrote:
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in
do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:do_install_append_virtclass-native() {
}
Quoted 7 lines
function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native
do_install_append()and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.I figure I must be missing something rather fundamental here. Any ideas what it might be?
Unfortunately the virtclass overrides can't help you when you want to just append something in the target case; however, what we usually do is just do an normal append and then check within it if [ "${PN}" = "${BPN}" ] which will be false for -native, -nativesdk etc.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 17 lines · Paul Eggleton
Quoted 16 lines · On Monday 16 April 2012 20:32:25 Darren Hart wrote:
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in
do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:do_install_append_virtclass-native() {
}
function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native
do_install_append()and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.
Quoted 7 lines
Quoted 2 lines
I figure I must be missing something rather fundamental here. Any ideas what it might be?
Unfortunately the virtclass overrides can't help you when you want to just append something in the target case; however, what we usually do is just do an normal append and then check within it if [ "${PN}" = "${BPN}" ] which will be false for -native, -nativesdk etc.
We're going to need to get out of this habit since it breaks for multilibs :(
Cheers,
Richard
Quoted 11 lines · Darren Hart
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in
do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:do_install_append_virtclass-native() { : }
Quoted 7 lines
function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native
do_install_append()and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.I figure I must be missing something rather fundamental here. Any ideas what it might be?
_append variables stack so if you do:
A_append = "x"A_append = "y"A_append = "z"
You'll end up with A = "xyz".
You can do something a little more ugly to work around it like:
do_install_append () {
${SYMLINK}
}SYMLINK = "ln -s a b"
SYMLINK_virtclass-native = ":"
Cheers,
Richard
Quoted 28 lines · Richard Purdie
Quoted 11 lines · Darren Hart
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in
do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:do_install_append_virtclass-native() { : }Quoted 7 lines
function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native
do_install_append()and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.I figure I must be missing something rather fundamental here. Any ideas what it might be?
_appendvariables stack so if you do:
A_append= "x"A_append= "y"A_append= "z"You'll end up with A = "xyz".
Quoted 9 lines
You can do something a little more ugly to work around it like:
do_install_append () { ${SYMLINK} }SYMLINK = "ln -s a b"
SYMLINK_virtclass-native = ":"
Thank you RP, that does the trick.
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 37 lines · Darren Hart
Quoted 34 lines · Richard Purdie
Quoted 11 lines · Darren Hart
I'm trying to address a symlink naming issue in the bzip2 package when used with Chrome. Chrome is looking for a specific soname, which the default install of bzip2 doesn't setup. I can address this easily by adding the symlink via a bzip2 bbappend in
do_install_append(). Unfortunately, this fails for the virtclass-native variant. I tried adding and empty:do_install_append_virtclass-native() { : }Quoted 7 lines
function to the bbappend, which still failed. I then added an echo statement which appeared in the output, but it still ran non-native
do_install_append()and failed. Switching the order of the functions made the echo output disappear, but the native variant still failed.I figure I must be missing something rather fundamental here. Any ideas what it might be?
_appendvariables stack so if you do:
A_append= "x"A_append= "y"A_append= "z"You'll end up with A = "xyz".
You can do something a little more ugly to work around it like:
do_install_append () { ${SYMLINK} }
Quoted 6 lines
Quoted 3 lines
SYMLINK = "ln -s a b"
SYMLINK_virtclass-native = ":"Thank you RP, that does the trick.
Also, I had a look at our docs:
dvhart@envy:~/source/poky/documentation [master]
$ grep -r virtclass-native * <empty>
Scott, seems to me we need to add something on the subject for the next release cycle.
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel