Skip to contentSkip to conversation

gettext.bbclass: do not add virtual/gettext to DEPENDS

PATCH Superseded Alexander Kanavin 2 participants 3 messages Aug 29, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gettext.bbclass: do not add virtual/gettext to DEPENDS

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.

---
 meta/classes/gettext.bbclass | 2 +-
 meta/classes/insane.bbclass  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/gettext.bbclass +1 -1
index 689ef55ed1f..da68e632424 100644
@@ -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)}"
meta/classes/insane.bbclass +2 -2
index b7177c9b329..a2ec466775f 100644
@@ -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:
Signature · 1 line
2.14.1
#1 lore raw
Quoted 10 lines · Alexander Kanavin

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

Quoted 11 lines
meta/classes/insane.bbclass +0 -0
index b7177c9b329..a2ec466775f 100644
@@ -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?

Quoted 7 lines

         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

Quoted 1 line

/dev/null" % config

                 if subprocess.call(gnu, shell=True) == 0:

Cheers,

Richard

#2 lore raw
Quoted 14 lines · Richard Purdie

meta/classes/insane.bbclass Rerun configure task after fixing this.""") · line 1186

Quoted 12 lines
meta/classes/insane.bbclass +1 -1
index b7177c9b329..a2ec466775f 100644
@@ -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