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

Submitted by Belal, Awais on Sept. 13, 2018, 9:35 a.m. | Patch ID: 154851

Details

Message ID 1536831336527.93802@mentor.com
State New
Headers show

Commit Message

Belal, Awais Sept. 13, 2018, 9:35 a.m.
From b736703a9d3f3c33e2e83ecd5e61dbddd5793cc8 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@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@mentor.com>
---
 lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
2.7.4



BR,
Awais

Patch hide | download patch | download mbox

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,

Comments

Reyna, David Sept. 14, 2018, 7:18 a.m.
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@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of Belal, Awais
Sent: Thursday, September 13, 2018 2:36 AM
To: bitbake-devel@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@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@mentor.com>
---
 lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
2.7.4


BR,
Awais
Belal, Awais Sept. 20, 2018, 7:59 a.m.
ping!


BR,
Awais
Belal, Awais Sept. 27, 2018, 7:54 a.m.
>> I recommend this for both Sumo and for master as well, so that they stay in sync.

Any thoughts here?



BR,
Awais
Richard Purdie Sept. 27, 2018, 4:53 p.m.
On Thu, 2018-09-27 at 07:54 +0000, Belal, Awais wrote:
> >> I recommend this for both Sumo and for master as well, so that
> they stay in sync.
> Any thoughts here?

I'm confused. Does master need the patch? or only sumo?

Cheers,

Richard
Belal, Awais Sept. 28, 2018, 7:37 a.m.
>> I'm confused. Does master need the patch? or only sumo?
Both.

BR,
Awais
Richard Purdie Sept. 28, 2018, 7:52 a.m.
On Fri, 2018-09-28 at 07:37 +0000, Belal, Awais wrote:
> > > I'm confused. Does master need the patch? or only sumo?
> 
> Both.

The patch doesn't apply to master so could you send a version which
applies there please? 

I can then apply the sumo one at the same time which does presumably
apply to sumo (I've not tried that as yet).

Thanks,

Richard
Belal, Awais Sept. 28, 2018, 10:38 a.m.
>> The patch doesn't apply to master so could you send a version which
>> applies there please?

>> I can then apply the sumo one at the same time which does presumably
>> apply to sumo (I've not tried that as yet).

Extremely sorry, this is only needed for sumo (1.38), master doesn't have this problem.


BR,
Awais
Armin Kuster Sept. 28, 2018, 4:08 p.m.
On 09/28/2018 03:38 AM, Belal, Awais wrote:
>>> The patch doesn't apply to master so could you send a version which
>>> applies there please?
>>> I can then apply the sumo one at the same time which does presumably
>>> apply to sumo (I've not tried that as yet).
> Extremely sorry, this is only needed for sumo (1.38), master doesn't have this problem.

This does not apply to sumo either. We have the commit it depends on:

c1f5ec8 bitbake: toaster: use a more flexible way to find bitbake

- armin

>
>
>
> BR,
> Awais
>
> ________________________________________
> From: richard.purdie@linuxfoundation.org <richard.purdie@linuxfoundation.org>
> Sent: Friday, September 28, 2018 12:52 PM
> To: Belal, Awais; Reyna, David; bitbake-devel@lists.openembedded.org
> Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution
>
> On Fri, 2018-09-28 at 07:37 +0000, Belal, Awais wrote:
>>>> I'm confused. Does master need the patch? or only sumo?
>> Both.
> The patch doesn't apply to master so could you send a version which
> applies there please?
>
> I can then apply the sumo one at the same time which does presumably
> apply to sumo (I've not tried that as yet).
>
> Thanks,
>
> Richard
Reyna, David Sept. 30, 2018, 7:06 a.m.
Hi all,

I created my own version of Awais's patch from my Sumo branch. The only difference was that I based by patch from the "bitbake" directory (Awais did it from the bitbake/lib" directory), plus I got an extra blank line at the end.

I am going to submit my version of the patch in a few minutes. It should look identical to the original from Awais, except for the above observations.

- David

-----Original Message-----
From: akuster808 [mailto:akuster808@gmail.com] 
Sent: Friday, September 28, 2018 9:09 AM
To: Belal, Awais; richard.purdie@linuxfoundation.org; Reyna, David; bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution



On 09/28/2018 03:38 AM, Belal, Awais wrote:
>>> The patch doesn't apply to master so could you send a version which
>>> applies there please?
>>> I can then apply the sumo one at the same time which does presumably
>>> apply to sumo (I've not tried that as yet).
> Extremely sorry, this is only needed for sumo (1.38), master doesn't have this problem.

This does not apply to sumo either. We have the commit it depends on:

c1f5ec8 bitbake: toaster: use a more flexible way to find bitbake

- armin

>
>
>
> BR,
> Awais
>
> ________________________________________
> From: richard.purdie@linuxfoundation.org <richard.purdie@linuxfoundation.org>
> Sent: Friday, September 28, 2018 12:52 PM
> To: Belal, Awais; Reyna, David; bitbake-devel@lists.openembedded.org
> Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution
>
> On Fri, 2018-09-28 at 07:37 +0000, Belal, Awais wrote:
>>>> I'm confused. Does master need the patch? or only sumo?
>> Both.
> The patch doesn't apply to master so could you send a version which
> applies there please?
>
> I can then apply the sumo one at the same time which does presumably
> apply to sumo (I've not tried that as yet).
>
> Thanks,
>
> Richard
Reyna, David Sept. 30, 2018, 7:40 a.m.
Hi again,

I have submitted the patch. The patch itself looks the same to me, however I did use the official "create-pull-request" on top of the latest pull, so maybe it will have a happier apply. I also took advantage of this submission by adding a formal Bugzilla case number into the commit text.

- David

-----Original Message-----
From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of Reyna, David
Sent: Sunday, September 30, 2018 12:07 AM
To: akuster808; Belal, Awais; richard.purdie@linuxfoundation.org
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution

Hi all,

I created my own version of Awais's patch from my Sumo branch. The only difference was that I based by patch from the "bitbake" directory (Awais did it from the bitbake/lib" directory), plus I got an extra blank line at the end.

I am going to submit my version of the patch in a few minutes. It should look identical to the original from Awais, except for the above observations.

- David

-----Original Message-----
From: akuster808 [mailto:akuster808@gmail.com] 
Sent: Friday, September 28, 2018 9:09 AM
To: Belal, Awais; richard.purdie@linuxfoundation.org; Reyna, David; bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution



On 09/28/2018 03:38 AM, Belal, Awais wrote:
>>> The patch doesn't apply to master so could you send a version which
>>> applies there please?
>>> I can then apply the sumo one at the same time which does presumably
>>> apply to sumo (I've not tried that as yet).
> Extremely sorry, this is only needed for sumo (1.38), master doesn't have this problem.

This does not apply to sumo either. We have the commit it depends on:

c1f5ec8 bitbake: toaster: use a more flexible way to find bitbake

- armin

>
>
>
> BR,
> Awais
>
> ________________________________________
> From: richard.purdie@linuxfoundation.org <richard.purdie@linuxfoundation.org>
> Sent: Friday, September 28, 2018 12:52 PM
> To: Belal, Awais; Reyna, David; bitbake-devel@lists.openembedded.org
> Subject: Re: [bitbake-devel] [sumo][PATCH] toaster: localhostbecontroller: fix bitbake path resolution
>
> On Fri, 2018-09-28 at 07:37 +0000, Belal, Awais wrote:
>>>> I'm confused. Does master need the patch? or only sumo?
>> Both.
> The patch doesn't apply to master so could you send a version which
> applies there please?
>
> I can then apply the sumo one at the same time which does presumably
> apply to sumo (I've not tried that as yet).
>
> Thanks,
>
> Richard