Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes
       [not found] <cover.1458803813.git.mariano.lopez@linux.intel.com>
@ 2016-03-24  7:20 ` mariano.lopez
  2016-03-24 18:04   ` Christopher Larson
  0 siblings, 1 reply; 5+ messages in thread
From: mariano.lopez @ 2016-03-24  7:20 UTC (permalink / raw)
  To: openembedded-core

From: Mariano Lopez <mariano.lopez@linux.intel.com>

It is pointless to archive several times the gcc source.
This change will archive gcc source once, for the gcc-source-{PV}
recipe.

[YOCTO #9327]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
 meta/classes/archiver.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index b95176b..1546bd0 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -61,6 +61,12 @@ python () {
     else:
         bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
 
+    # We just archive gcc-source for all the gcc related recipes
+    if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
+            and not pn.startswith('gcc-source'):
+        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
+        return
+
     ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
     ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True)
     ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)
-- 
2.6.2



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

* Re: [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes
  2016-03-24  7:20 ` [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes mariano.lopez
@ 2016-03-24 18:04   ` Christopher Larson
  2016-03-28 18:09     ` Mariano Lopez
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Larson @ 2016-03-24 18:04 UTC (permalink / raw)
  To: mariano.lopez, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

On Thu, Mar 24, 2016 at 8:26 AM <mariano.lopez@linux.intel.com> wrote:

> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
> It is pointless to archive several times the gcc source.
> This change will archive gcc source once, for the gcc-source-{PV}
> recipe.
>
> [YOCTO #9327]
>
> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
> ---
>  meta/classes/archiver.bbclass | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
> index b95176b..1546bd0 100644
> --- a/meta/classes/archiver.bbclass
> +++ b/meta/classes/archiver.bbclass
> @@ -61,6 +61,12 @@ python () {
>      else:
>          bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
>
> +    # We just archive gcc-source for all the gcc related recipes
> +    if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
> +            and not pn.startswith('gcc-source'):
> +        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' %
> pn)
> +        return
>

Hmm, I wonder if it'd be possible to make this more generic, check for
work-shared or something.

[-- Attachment #2: Type: text/html, Size: 1698 bytes --]

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

* Re: [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes
  2016-03-24 18:04   ` Christopher Larson
@ 2016-03-28 18:09     ` Mariano Lopez
  2016-03-28 18:43       ` Christopher Larson
  0 siblings, 1 reply; 5+ messages in thread
From: Mariano Lopez @ 2016-03-28 18:09 UTC (permalink / raw)
  To: Christopher Larson, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]



On 03/24/2016 12:04 PM, Christopher Larson wrote:
>
>
> On Thu, Mar 24, 2016 at 8:26 AM <mariano.lopez@linux.intel.com 
> <mailto:mariano.lopez@linux.intel.com>> wrote:
>
>     From: Mariano Lopez <mariano.lopez@linux.intel.com
>     <mailto:mariano.lopez@linux.intel.com>>
>     +    # We just archive gcc-source for all the gcc related recipes
>     +    if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
>     +            and not pn.startswith('gcc-source'):
>     +        bb.debug(1, 'archiver: %s is excluded, covered by
>     gcc-source' % pn)
>     +        return
>
>
> Hmm, I wonder if it'd be possible to make this more generic, check for 
> work-shared or something.

I was thinking the same when writing the patch, but it seems gcc is more 
of a corner case. The only two recipes that use work-shared are gcc and 
the kernel, the kernel case it's already covered checking for the class 
"kernel-yocto". In case of gcc we can't check for a class, we would need 
for work-shared and gcc, and that would be the almost the same 
comparison as is in the patch.

Mariano

[-- Attachment #2: Type: text/html, Size: 2278 bytes --]

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

* Re: [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes
  2016-03-28 18:09     ` Mariano Lopez
@ 2016-03-28 18:43       ` Christopher Larson
  2016-03-28 22:18         ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Larson @ 2016-03-28 18:43 UTC (permalink / raw)
  To: Mariano Lopez, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

Fair enough, thanks for the clarification!

On Mon, Mar 28, 2016 at 11:08 AM Mariano Lopez <
mariano.lopez@linux.intel.com> wrote:

>
>
> On 03/24/2016 12:04 PM, Christopher Larson wrote:
>
> On Thu, Mar 24, 2016 at 8:26 AM <mariano.lopez@linux.intel.com> wrote:
>
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
>
>> +    # We just archive gcc-source for all the gcc related recipes
>> +    if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
>> +            and not pn.startswith('gcc-source'):
>> +        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' %
>> pn)
>> +        return
>>
>
> Hmm, I wonder if it'd be possible to make this more generic, check for
> work-shared or something.
>
>
> I was thinking the same when writing the patch, but it seems gcc is more
> of a corner case. The only two recipes that use work-shared are gcc and the
> kernel, the kernel case it's already covered checking for the class
> "kernel-yocto". In case of gcc we can't check for a class, we would need
> for work-shared and gcc, and that would be the almost the same comparison
> as is in the patch.
>
>
> Mariano
>

[-- Attachment #2: Type: text/html, Size: 3052 bytes --]

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

* Re: [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes
  2016-03-28 18:43       ` Christopher Larson
@ 2016-03-28 22:18         ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2016-03-28 22:18 UTC (permalink / raw)
  To: Christopher Larson, Mariano Lopez, openembedded-core

On Mon, 2016-03-28 at 18:43 +0000, Christopher Larson wrote:
> Fair enough, thanks for the clarification!

Its worth noting we did kill the concept of "shared stamps" from
bitbake since it turned out to be a huge pain which could be solved in
other ways which whilst ugly, are more reliable and work better. It was
only ever used by gcc and didn't work with the kernel as the semantics
were different.

I'd love a clean solution but have yet to see something that can work
better than what we have today without invasive changes to bitbake.

Cheers,

Richard





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

end of thread, other threads:[~2016-03-28 22:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1458803813.git.mariano.lopez@linux.intel.com>
2016-03-24  7:20 ` [PATCH 1/1] archiver.bbclass: Just archive gcc-source for all gcc recipes mariano.lopez
2016-03-24 18:04   ` Christopher Larson
2016-03-28 18:09     ` Mariano Lopez
2016-03-28 18:43       ` Christopher Larson
2016-03-28 22:18         ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox