Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] autotools: Fix interaction with bitbake -b
Date: Fri, 12 Feb 2016 11:35:07 +0000	[thread overview]
Message-ID: <1455276907.16142.274.camel@linuxfoundation.org> (raw)

If you run bitbake -b on something using autotools with dependencies on

m4 files, it currently fails as the TASKDEPDATA is incomplete for
bitbake -b
and this means the relevant macros aren't found.

Work around this by adding *all* m4 files for the -b case (and show a warning).

[YOCTO #8890]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index a5f2bff..6649f5d 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -148,12 +148,18 @@ python autotools_copy_aclocals () {
     bb.utils.mkdirhier(aclocaldir)
     start = None
     configuredeps = []
+    # Detect bitbake -b usage
+    # Everything but quilt-native would have dependencies
+    nodeps = (pn != "quilt-native")
 
     for dep in taskdepdata:
         data = taskdepdata[dep]
         if data[1] == "do_configure" and data[0] == pn:
             start = dep
+        if not nodeps and start:
             break
+        if nodeps and data[0] != pn:
+            nodeps = False
     if start is None:
         bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
 
@@ -188,6 +194,11 @@ python autotools_copy_aclocals () {
     #bb.warn(str(configuredeps2))
 
     cp = []
+    if nodeps:
+        bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files")
+        for l in [d.expand("${STAGING_DATADIR_NATIVE}/aclocal/"), d.expand("${STAGING_DATADIR}/aclocal/")]:
+            cp.extend(os.path.join(l, f) for f in os.listdir(l))
+
     for c in configuredeps:
         if c.endswith("-native"):
             manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)




                 reply	other threads:[~2016-02-12 11:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455276907.16142.274.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox