Patchwork gtk-doc.bbclass: unbreak dependency-chain for native recipes

login
register
mail settings
Submitter Andreas Müller
Date July 26, 2012, 3:16 p.m.
Message ID <1343315761-6314-1-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/33139/
State Superseded
Headers show

Comments

Andreas Müller - July 26, 2012, 3:16 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta/classes/gtk-doc.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Ross Burton - July 26, 2012, 3:19 p.m.
On 26 July 2012 16:16, Andreas Müller <schnitzeltony@googlemail.com> wrote:
> -DEPENDS_virtclass-native_append = " gtk-doc-stub-native"
> +DEPENDS_append_virtclass-native = " gtk-doc-stub-native"

Was this a typo on my part, or is there a semantic difference between those?

Ross
Andreas Müller - July 26, 2012, 3:35 p.m.
On Thu, Jul 26, 2012 at 5:19 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 26 July 2012 16:16, Andreas Müller <schnitzeltony@googlemail.com> wrote:
>> -DEPENDS_virtclass-native_append = " gtk-doc-stub-native"
>> +DEPENDS_append_virtclass-native = " gtk-doc-stub-native"
>
> Was this a typo on my part, or is there a semantic difference between those?
>
> Ross
>
It is not an answer to your question but

I grepped for DEPENDS_virtclass-native_append in oe-core and did find
one occurrence in gtk-doc.bbclass. DEPENDS_append_virtclass-native I
found in xcb-proto.inc so I gave it a try by

bitbake -e atk-native | grep ^DEPENDS

A correct answer to your question is up to experts :)

Andreas
Chris Larson - July 26, 2012, 3:49 p.m.
On Thu, Jul 26, 2012 at 8:35 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Thu, Jul 26, 2012 at 5:19 PM, Burton, Ross <ross.burton@intel.com> wrote:
>> On 26 July 2012 16:16, Andreas Müller <schnitzeltony@googlemail.com> wrote:
>>> -DEPENDS_virtclass-native_append = " gtk-doc-stub-native"
>>> +DEPENDS_append_virtclass-native = " gtk-doc-stub-native"
>>
>> Was this a typo on my part, or is there a semantic difference between those?
>>
>> Ross
>>
> It is not an answer to your question but
>
> I grepped for DEPENDS_virtclass-native_append in oe-core and did find
> one occurrence in gtk-doc.bbclass. DEPENDS_append_virtclass-native I
> found in xcb-proto.inc so I gave it a try by
>
> bitbake -e atk-native | grep ^DEPENDS

DEPENDS = "alpha"
DEPENDS_virtclass-native_append = "foo"

End result for native: the latter is applied, resulting in a
'DEPENDS_virtclass-native' whose contents are just 'foo'. Then
DEPENDS_virtclass-native overwrites DEPENDS, resulting in the main
variable only containing the bits you appended, not the original
contents.

To sum up, _<override>_append appends to the override, which then
overwrites the original, whereas _append_<override> appends directly
to the main variable, conditionally on the override.

I'm not sure if that clears it up.. I've never been good at describing
this. For reference, I'm pretty sure we put something in the bitbake
manual about this circumstance specifically, since we chose to leave
it this way to retain maximum flexibility when writing the code, but
realized that it was a potential source of confusion.
Richard Purdie - July 26, 2012, 3:59 p.m.
On Thu, 2012-07-26 at 17:16 +0200, Andreas Müller wrote:
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  meta/classes/gtk-doc.bbclass |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
> index 8a312f5..be10c75 100644
> --- a/meta/classes/gtk-doc.bbclass
> +++ b/meta/classes/gtk-doc.bbclass
> @@ -7,7 +7,7 @@
>  # packages up any existing documentation (so from tarball builds).
>  
>  DEPENDS_append = " gtk-doc-stub-native"
> -DEPENDS_virtclass-native_append = " gtk-doc-stub-native"
> +DEPENDS_append_virtclass-native = " gtk-doc-stub-native"
>  
>  EXTRA_OECONF_append = "\
>    --disable-gtk-doc \

What happens if we simply remove this line entirely?

Do we have any recipes setting DEPENDS_virtclass-native which also use
this class? If so, we might end up just hardcoding things...

Cheers,

Richard

Patch

diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 8a312f5..be10c75 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -7,7 +7,7 @@ 
 # packages up any existing documentation (so from tarball builds).
 
 DEPENDS_append = " gtk-doc-stub-native"
-DEPENDS_virtclass-native_append = " gtk-doc-stub-native"
+DEPENDS_append_virtclass-native = " gtk-doc-stub-native"
 
 EXTRA_OECONF_append = "\
   --disable-gtk-doc \