* [v2][PATCH 1/1] vala.bbclass: add dependency on vala
@ 2013-09-26 18:52 Joe Slater
2013-09-27 0:13 ` Randy MacLeod
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Joe Slater @ 2013-09-26 18:52 UTC (permalink / raw)
To: openembedded-core
This class points the inheritor, if it is a target,
to directories in the target sysroot, so we want to
be sure the .vapi files are there.
Signed-off-by: Joe Slater <jslater@windriver.com>
---
meta/classes/vala.bbclass | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/vala.bbclass b/meta/classes/vala.bbclass
index c7db08c..3b70a04 100644
--- a/meta/classes/vala.bbclass
+++ b/meta/classes/vala.bbclass
@@ -1,9 +1,11 @@
# Vala has problems with multiple concurrent invocations
PARALLEL_MAKE = ""
-# Vala needs vala-native
-DEPENDS += "vala-native"
-DEPENDS_virtclass-native += "vala-native"
+# Everyone needs vala-native and targets need vala, too,
+# because that is where target builds look for .vapi files.
+#
+VALADEPENDS_class-target = "vala"
+DEPENDS_append = " vala-native ${VALADEPENDS}"
# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
export STAGING_DATADIR
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
2013-09-26 18:52 [v2][PATCH 1/1] vala.bbclass: add dependency on vala Joe Slater
@ 2013-09-27 0:13 ` Randy MacLeod
2013-09-27 14:45 ` Mark Hatle
2013-10-24 18:28 ` FW: " Slater, Joseph
2013-10-29 15:11 ` Saul Wold
2 siblings, 1 reply; 5+ messages in thread
From: Randy MacLeod @ 2013-09-27 0:13 UTC (permalink / raw)
To: Joe Slater, openembedded-core, Hatle, Mark
On 13-09-26 02:52 PM, Joe Slater wrote:
> This class points the inheritor, if it is a target,
> to directories in the target sysroot, so we want to
> be sure the .vapi files are there.
>
> Signed-off-by: Joe Slater <jslater@windriver.com>
> ---
> meta/classes/vala.bbclass | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/vala.bbclass b/meta/classes/vala.bbclass
> index c7db08c..3b70a04 100644
> --- a/meta/classes/vala.bbclass
> +++ b/meta/classes/vala.bbclass
> @@ -1,9 +1,11 @@
> # Vala has problems with multiple concurrent invocations
> PARALLEL_MAKE = ""
>
> -# Vala needs vala-native
> -DEPENDS += "vala-native"
> -DEPENDS_virtclass-native += "vala-native"
> +# Everyone needs vala-native and targets need vala, too,
> +# because that is where target builds look for .vapi files.
> +#
> +VALADEPENDS_class-target = "vala"
> +DEPENDS_append = " vala-native ${VALADEPENDS}"
>
> # Our patched version of Vala looks in STAGING_DATADIR for .vapi files
> export STAGING_DATADIR
>
In response to your previous patch, Richard P said:
> In class code this is a really bad idea. Why? Imagine a recipe which
> does:
>
> DEPENDS =+ "x"
> DEPENDS_class-native = "y"
>
> The += on the class-native above will not do what you think.
>
> I'd recommend something like:
>
> VALADEPENDS = "vala vala-native"
> VALADEPENDS_class-native = "vala-native"
> DEPENDS += "${VALADEPENDS}"
>
> Most other classes actually use _append on DEPENDS to ensure consistent
> behaviour.
so send it to oe-core and see what they say.
Mark H any comments?
// Randy
--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
2013-09-27 0:13 ` Randy MacLeod
@ 2013-09-27 14:45 ` Mark Hatle
0 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2013-09-27 14:45 UTC (permalink / raw)
To: Randy MacLeod; +Cc: Joe Slater, openembedded-core
On 9/26/13 7:13 PM, Randy MacLeod wrote:
> On 13-09-26 02:52 PM, Joe Slater wrote:
>> This class points the inheritor, if it is a target,
>> to directories in the target sysroot, so we want to
>> be sure the .vapi files are there.
>>
>> Signed-off-by: Joe Slater <jslater@windriver.com>
>> ---
>> meta/classes/vala.bbclass | 8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/vala.bbclass b/meta/classes/vala.bbclass
>> index c7db08c..3b70a04 100644
>> --- a/meta/classes/vala.bbclass
>> +++ b/meta/classes/vala.bbclass
>> @@ -1,9 +1,11 @@
>> # Vala has problems with multiple concurrent invocations
>> PARALLEL_MAKE = ""
>>
>> -# Vala needs vala-native
>> -DEPENDS += "vala-native"
>> -DEPENDS_virtclass-native += "vala-native"
>> +# Everyone needs vala-native and targets need vala, too,
>> +# because that is where target builds look for .vapi files.
>> +#
>> +VALADEPENDS_class-target = "vala"
>> +DEPENDS_append = " vala-native ${VALADEPENDS}"
>>
>> # Our patched version of Vala looks in STAGING_DATADIR for .vapi files
>> export STAGING_DATADIR
>>
>
>
> In response to your previous patch, Richard P said:
>> In class code this is a really bad idea. Why? Imagine a recipe which
>> does:
>>
>> DEPENDS =+ "x"
>> DEPENDS_class-native = "y"
>>
>> The += on the class-native above will not do what you think.
>>
>> I'd recommend something like:
>>
>> VALADEPENDS = "vala vala-native"
>> VALADEPENDS_class-native = "vala-native"
>> DEPENDS += "${VALADEPENDS}"
>>
>> Most other classes actually use _append on DEPENDS to ensure consistent
>> behaviour.
>
> so send it to oe-core and see what they say.
> Mark H any comments?
Good catch, I had missed this.
Ya the overrides (class-native) run -after- the rest of the system. So:
DEPENDS = "foobar"
DEPENDS =+ "x"
DEPENDS_class-native =+ "y"
For "normal" it' would be "x foobar"
For "native" it would be "y"
This is because that system evals and gets:
DEPENDS = "foobar" (DEPENDS = "foobar")
DEPENDS =+ "x" (DEPENDS = "x foobar")
DEPENDS_class-native =+ "y" (DEPENDS_class-native = "y")
invoke 'class-native' override, DEPENDS = "y"
--Mark
> // Randy
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* FW: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
2013-09-26 18:52 [v2][PATCH 1/1] vala.bbclass: add dependency on vala Joe Slater
2013-09-27 0:13 ` Randy MacLeod
@ 2013-10-24 18:28 ` Slater, Joseph
2013-10-29 15:11 ` Saul Wold
2 siblings, 0 replies; 5+ messages in thread
From: Slater, Joseph @ 2013-10-24 18:28 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
I sent the following a while ago and haven't seen any comments,
but I think it parallels the suggestions made about v1.
The patch has not been put into oe-core master.
Joe
-----Original Message-----
From: Joe Slater [mailto:jslater@windriver.com]
Sent: Thursday, September 26, 2013 11:53 AM
To: openembedded-core@lists.openembedded.org
Cc: MacLeod, Randy; Slater, Joseph
Subject: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
This class points the inheritor, if it is a target,
to directories in the target sysroot, so we want to
be sure the .vapi files are there.
Signed-off-by: Joe Slater <jslater@windriver.com>
---
meta/classes/vala.bbclass | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/vala.bbclass b/meta/classes/vala.bbclass
index c7db08c..3b70a04 100644
--- a/meta/classes/vala.bbclass
+++ b/meta/classes/vala.bbclass
@@ -1,9 +1,11 @@
# Vala has problems with multiple concurrent invocations
PARALLEL_MAKE = ""
-# Vala needs vala-native
-DEPENDS += "vala-native"
-DEPENDS_virtclass-native += "vala-native"
+# Everyone needs vala-native and targets need vala, too,
+# because that is where target builds look for .vapi files.
+#
+VALADEPENDS_class-target = "vala"
+DEPENDS_append = " vala-native ${VALADEPENDS}"
# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
export STAGING_DATADIR
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
2013-09-26 18:52 [v2][PATCH 1/1] vala.bbclass: add dependency on vala Joe Slater
2013-09-27 0:13 ` Randy MacLeod
2013-10-24 18:28 ` FW: " Slater, Joseph
@ 2013-10-29 15:11 ` Saul Wold
2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2013-10-29 15:11 UTC (permalink / raw)
To: Joe Slater, openembedded-core
On 09/26/2013 11:52 AM, Joe Slater wrote:
> This class points the inheritor, if it is a target,
> to directories in the target sysroot, so we want to
> be sure the .vapi files are there.
>
> Signed-off-by: Joe Slater <jslater@windriver.com>
> ---
> meta/classes/vala.bbclass | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/vala.bbclass b/meta/classes/vala.bbclass
> index c7db08c..3b70a04 100644
> --- a/meta/classes/vala.bbclass
> +++ b/meta/classes/vala.bbclass
> @@ -1,9 +1,11 @@
> # Vala has problems with multiple concurrent invocations
> PARALLEL_MAKE = ""
>
> -# Vala needs vala-native
> -DEPENDS += "vala-native"
> -DEPENDS_virtclass-native += "vala-native"
> +# Everyone needs vala-native and targets need vala, too,
> +# because that is where target builds look for .vapi files.
> +#
> +VALADEPENDS_class-target = "vala"
> +DEPENDS_append = " vala-native ${VALADEPENDS}"
You should really have a default value for VALADEPENDS = "", the above
class override relies on bitbake behaviour which could change.
Thanks
Sau!
>
> # Our patched version of Vala looks in STAGING_DATADIR for .vapi files
> export STAGING_DATADIR
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-29 15:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26 18:52 [v2][PATCH 1/1] vala.bbclass: add dependency on vala Joe Slater
2013-09-27 0:13 ` Randy MacLeod
2013-09-27 14:45 ` Mark Hatle
2013-10-24 18:28 ` FW: " Slater, Joseph
2013-10-29 15:11 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox