All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gettext.bbclass: do not add virtual/gettext to DEPENDS
@ 2017-08-29  9:55 Alexander Kanavin
  2017-08-29 10:32 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2017-08-29  9:55 UTC (permalink / raw)
  To: openembedded-core

gettext has a notoriously slow configuration step, and so in my testing
this  greatly speeds up building core-image-minimal: from 21m36s to 19m2s
(empty sstate and tmp, but pre-populated downloads).

I have also built world, and core-image-sato to make sure it doesn't break
or modify the build, and there is no difference whatsoever in packages
and images content. Target gettext not seems to be used for anything.

Also fix up insane.bbclass to remove the corresponding QA check.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/gettext.bbclass | 2 +-
 meta/classes/insane.bbclass  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index 689ef55ed1f..da68e632424 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -13,7 +13,7 @@ def gettext_oeconf(d):
         return '--disable-nls'
     return "--enable-nls"
 
-DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
+DEPENDS_GETTEXT ??= "gettext-native"
 
 BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
 EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index b7177c9b329..a2ec466775f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1183,9 +1183,9 @@ Rerun configure task after fixing this.""")
         elif bb.data.inherits_class('cross-canadian', d):
             gt = "nativesdk-gettext"
         else:
-            gt = "virtual/" + ml + "gettext"
+            gt = None
         deps = bb.utils.explode_deps(d.getVar('DEPENDS') or "")
-        if gt not in deps:
+        if gt is not None and gt not in deps:
             for config in configs:
                 gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
                 if subprocess.call(gnu, shell=True) == 0:
-- 
2.14.1



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

* Re: [PATCH] gettext.bbclass: do not add virtual/gettext to DEPENDS
  2017-08-29  9:55 [PATCH] gettext.bbclass: do not add virtual/gettext to DEPENDS Alexander Kanavin
@ 2017-08-29 10:32 ` Richard Purdie
  2017-08-29 10:49   ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2017-08-29 10:32 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Tue, 2017-08-29 at 12:55 +0300, Alexander Kanavin wrote:
> gettext has a notoriously slow configuration step, and so in my
> testing this  greatly speeds up building core-image-minimal: from
> 21m36s to 19m2s (empty sstate and tmp, but pre-populated downloads).
> 
> I have also built world, and core-image-sato to make sure it doesn't
> break or modify the build, and there is no difference whatsoever in
> packages and images content. Target gettext not seems to be used for
> anything.
> 
> Also fix up insane.bbclass to remove the corresponding QA check.

I like this idea, one small question below...

> diff --git a/meta/classes/insane.bbclass
> b/meta/classes/insane.bbclass
> index b7177c9b329..a2ec466775f 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -1183,9 +1183,9 @@ Rerun configure task after fixing this.""")
>          elif bb.data.inherits_class('cross-canadian', d):
>              gt = "nativesdk-gettext"
>          else:
> -            gt = "virtual/" + ml + "gettext"
> +            gt = None

Should this be gettext-native?

>          deps = bb.utils.explode_deps(d.getVar('DEPENDS') or "")
> -        if gt not in deps:
> +        if gt is not None and gt not in deps:
>              for config in configs:
>                  gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s
> >/dev/null" % config
>                  if subprocess.call(gnu, shell=True) == 0:

Cheers,

Richard


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

* Re: [PATCH] gettext.bbclass: do not add virtual/gettext to DEPENDS
  2017-08-29 10:32 ` Richard Purdie
@ 2017-08-29 10:49   ` Alexander Kanavin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2017-08-29 10:49 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 08/29/2017 01:32 PM, Richard Purdie wrote:
> 
>> diff --git a/meta/classes/insane.bbclass
>> b/meta/classes/insane.bbclass
>> index b7177c9b329..a2ec466775f 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -1183,9 +1183,9 @@ Rerun configure task after fixing this.""")
>>           elif bb.data.inherits_class('cross-canadian', d):
>>               gt = "nativesdk-gettext"
>>           else:
>> -            gt = "virtual/" + ml + "gettext"
>> +            gt = None
> 
> Should this be gettext-native?

Yes; then this can be also merged with the first branch of the if-else 
statement:

         if bb.data.inherits_class('native', d) or 
bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', 
d) or bb.data.inherits_class('nativesdk', d):
             gt = "gettext-native"


I'll resend the patch.

Alex


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

end of thread, other threads:[~2017-08-29 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29  9:55 [PATCH] gettext.bbclass: do not add virtual/gettext to DEPENDS Alexander Kanavin
2017-08-29 10:32 ` Richard Purdie
2017-08-29 10:49   ` Alexander Kanavin

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.