All of lore.kernel.org
 help / color / mirror / Atom feed
* Writing do_install_append for target and virtclass-native in a bbappend
@ 2012-04-17  3:32 Darren Hart
  2012-04-17  9:32 ` Paul Eggleton
  2012-04-17 13:19 ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Darren Hart @ 2012-04-17  3:32 UTC (permalink / raw)
  To: Yocto Project

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?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing do_install_append for target and virtclass-native in a bbappend
  2012-04-17  3:32 Writing do_install_append for target and virtclass-native in a bbappend Darren Hart
@ 2012-04-17  9:32 ` Paul Eggleton
  2012-04-17 13:20   ` Richard Purdie
  2012-04-17 13:19 ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2012-04-17  9:32 UTC (permalink / raw)
  To: Darren Hart; +Cc: yocto

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.
> 
> 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

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing do_install_append for target and virtclass-native in a bbappend
  2012-04-17  3:32 Writing do_install_append for target and virtclass-native in a bbappend Darren Hart
  2012-04-17  9:32 ` Paul Eggleton
@ 2012-04-17 13:19 ` Richard Purdie
  2012-04-17 16:12   ` Darren Hart
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2012-04-17 13:19 UTC (permalink / raw)
  To: Darren Hart; +Cc: Yocto Project

On Mon, 2012-04-16 at 20:32 -0700, 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.
> 
> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing do_install_append for target and virtclass-native in a bbappend
  2012-04-17  9:32 ` Paul Eggleton
@ 2012-04-17 13:20   ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2012-04-17 13:20 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto, Darren Hart

On Tue, 2012-04-17 at 10:32 +0100, Paul Eggleton wrote:
> 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.
> > 
> > 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing do_install_append for target and virtclass-native in a bbappend
  2012-04-17 13:19 ` Richard Purdie
@ 2012-04-17 16:12   ` Darren Hart
  2012-04-17 16:14     ` Darren Hart
  0 siblings, 1 reply; 6+ messages in thread
From: Darren Hart @ 2012-04-17 16:12 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Yocto Project



On 04/17/2012 06:19 AM, Richard Purdie wrote:
> On Mon, 2012-04-16 at 20:32 -0700, 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.
>>
>> 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 = ":"
> 

Thank you RP, that does the trick.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing do_install_append for target and virtclass-native in a bbappend
  2012-04-17 16:12   ` Darren Hart
@ 2012-04-17 16:14     ` Darren Hart
  0 siblings, 0 replies; 6+ messages in thread
From: Darren Hart @ 2012-04-17 16:14 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Yocto Project



On 04/17/2012 09:12 AM, Darren Hart wrote:
> 
> 
> On 04/17/2012 06:19 AM, Richard Purdie wrote:
>> On Mon, 2012-04-16 at 20:32 -0700, 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.
>>>
>>> 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 = ":"
>>
> 
> 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.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-17 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17  3:32 Writing do_install_append for target and virtclass-native in a bbappend Darren Hart
2012-04-17  9:32 ` Paul Eggleton
2012-04-17 13:20   ` Richard Purdie
2012-04-17 13:19 ` Richard Purdie
2012-04-17 16:12   ` Darren Hart
2012-04-17 16:14     ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.