All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment
@ 2018-11-01 21:40 Awais Belal
  2018-11-02  1:18 ` Reyna, David
  0 siblings, 1 reply; 3+ messages in thread
From: Awais Belal @ 2018-11-01 21:40 UTC (permalink / raw)
  To: bitbake-devel

Updates for YOCTO #12891 allowed a user to have a directory
structure different to that of yocto (bitbake isn't inside
oe-core) whereas the definition of OE_ROOT in the main toaster
binary still assumes the same while checking for .templateconf
and hence we see an error on the cmdline in such cases:
bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory
The change here now allows the user to provide OE_ROOT through
the environment in such cases and otherwise defaults to the older
mechanism to fix this issue.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 bin/toaster | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/toaster b/bin/toaster
index 9fffbc6..ecf66fa 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -161,7 +161,9 @@ fi
 
 export BBBASEDIR=`dirname $TOASTER`/..
 MANAGE="python3 $BBBASEDIR/lib/toaster/manage.py"
-OE_ROOT=`dirname $TOASTER`/../..
+if [ -z "$OE_ROOT" ]; then
+    OE_ROOT=`dirname $TOASTER`/../..
+fi
 
 # this is the configuraton file we are using for toaster
 # we are using the same logic that oe-setup-builddir uses
-- 
2.7.4



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

* Re: [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment
  2018-11-01 21:40 [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment Awais Belal
@ 2018-11-02  1:18 ` Reyna, David
  2018-11-08  6:24   ` Belal, Awais
  0 siblings, 1 reply; 3+ messages in thread
From: Reyna, David @ 2018-11-02  1:18 UTC (permalink / raw)
  To: Awais Belal, bitbake-devel@lists.openembedded.org

Looks good to me!

- David

-----Original Message-----
From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of Awais Belal
Sent: Thursday, November 01, 2018 2:40 PM
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake-devel] [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment

Updates for YOCTO #12891 allowed a user to have a directory
structure different to that of yocto (bitbake isn't inside
oe-core) whereas the definition of OE_ROOT in the main toaster
binary still assumes the same while checking for .templateconf
and hence we see an error on the cmdline in such cases:
bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory
The change here now allows the user to provide OE_ROOT through
the environment in such cases and otherwise defaults to the older
mechanism to fix this issue.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 bin/toaster | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/toaster b/bin/toaster
index 9fffbc6..ecf66fa 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -161,7 +161,9 @@ fi
 
 export BBBASEDIR=`dirname $TOASTER`/..
 MANAGE="python3 $BBBASEDIR/lib/toaster/manage.py"
-OE_ROOT=`dirname $TOASTER`/../..
+if [ -z "$OE_ROOT" ]; then
+    OE_ROOT=`dirname $TOASTER`/../..
+fi
 
 # this is the configuraton file we are using for toaster
 # we are using the same logic that oe-setup-builddir uses
-- 
2.7.4

-- 
_______________________________________________
bitbake-devel mailing list
bitbake-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/bitbake-devel


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

* Re: [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment
  2018-11-02  1:18 ` Reyna, David
@ 2018-11-08  6:24   ` Belal, Awais
  0 siblings, 0 replies; 3+ messages in thread
From: Belal, Awais @ 2018-11-08  6:24 UTC (permalink / raw)
  To: Reyna, David, bitbake-devel@lists.openembedded.org

Ping! Can we get this into sumo?

BR,
Awais

________________________________________
From: Reyna, David <david.reyna@windriver.com>
Sent: Friday, November 2, 2018 6:18 AM
To: Belal, Awais; bitbake-devel@lists.openembedded.org
Subject: RE: [bitbake-devel] [PATCH v2] bitbake: toaster: allow OE_ROOT to be   provided through environment

Looks good to me!

- David

-----Original Message-----
From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of Awais Belal
Sent: Thursday, November 01, 2018 2:40 PM
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake-devel] [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment

Updates for YOCTO #12891 allowed a user to have a directory
structure different to that of yocto (bitbake isn't inside
oe-core) whereas the definition of OE_ROOT in the main toaster
binary still assumes the same while checking for .templateconf
and hence we see an error on the cmdline in such cases:
bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory
The change here now allows the user to provide OE_ROOT through
the environment in such cases and otherwise defaults to the older
mechanism to fix this issue.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 bin/toaster | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/toaster b/bin/toaster
index 9fffbc6..ecf66fa 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -161,7 +161,9 @@ fi

 export BBBASEDIR=`dirname $TOASTER`/..
 MANAGE="python3 $BBBASEDIR/lib/toaster/manage.py"
-OE_ROOT=`dirname $TOASTER`/../..
+if [ -z "$OE_ROOT" ]; then
+    OE_ROOT=`dirname $TOASTER`/../..
+fi

 # this is the configuraton file we are using for toaster
 # we are using the same logic that oe-setup-builddir uses
--
2.7.4

--
_______________________________________________
bitbake-devel mailing list
bitbake-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/bitbake-devel


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

end of thread, other threads:[~2018-11-08  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-01 21:40 [PATCH v2] bitbake: toaster: allow OE_ROOT to be provided through environment Awais Belal
2018-11-02  1:18 ` Reyna, David
2018-11-08  6:24   ` Belal, Awais

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.