[bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution

Reyna, David david.reyna at windriver.com
Fri Sep 14 07:18:10 UTC 2018


Hi all,

I recommend this for both Sumo and for master as well, so that they stay in sync.

The cherry-pick should be clean between the two branches.

- David

From: bitbake-devel-bounces at lists.openembedded.org [mailto:bitbake-devel-bounces at lists.openembedded.org] On Behalf Of Belal, Awais
Sent: Thursday, September 13, 2018 2:36 AM
To: bitbake-devel at lists.openembedded.org
Subject: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution


>From b736703a9d3f3c33e2e83ecd5e61dbddd5793cc8 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal at mentor.com>
Date: Thu, 13 Sep 2018 14:12:18 +0500
Subject: [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution



15340edce23e63b060c75114d508e1f76757239c introduced a way which
allowed bitbake to be found from the PATH variable when directory
structures different from poky are used. This just drops a leftover
which made the earlier implementation meaningless by reassigning
the path relative to oe-core/meta.



Signed-off-by: Awais Belal <awais_belal at mentor.com>
---
 lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py
index 3850334..63b4187 100644
--- a/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -360,12 +360,12 @@ class LocalhostBEController(BuildEnvironmentController):
             for path in os.environ["PATH"].split(os.pathsep):
                 if os.path.exists(os.path.join(path, 'bitbake')):
                     bitbake = os.path.join(path, 'bitbake')
+                    logger.info("Found Bitbake at: %s" % path)
                     break
             else:
                 logger.error("Looks like Bitbake is not available, please fix your environment")

         # run bitbake server from the clone
-        bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake')
         toasterlayers = os.path.join(builddir,"conf/toaster-bblayers.conf")
         self._shellcmd('%s bash -c \"source %s %s; BITBAKE_UI="knotty" %s --read %s --read %s '
                        '--server-only -B 0.0.0.0:0\"' % (env_clean, oe_init,
--
2.7.4


BR,
Awais
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20180914/cb584d6f/attachment-0002.html>


More information about the bitbake-devel mailing list