All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] devshell: make sure toolchains are populated in sysroot
@ 2017-05-29  5:16 Chang Rebecca Swee Fun
  2017-05-29  5:16 ` [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell Chang Rebecca Swee Fun
  2017-05-29  5:16 ` [PATCH 2/2] devshell.bbclass: clean up trailing whitespaces Chang Rebecca Swee Fun
  0 siblings, 2 replies; 6+ messages in thread
From: Chang Rebecca Swee Fun @ 2017-05-29  5:16 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List

Hi all,

In the previous implementation, none of the build tools will be in
the sysroot if we clean the recipe and run devshell on it.
This is a fix on devshell.bbclass to ensure all necessary toolchains
are available in sysroot whenever we enter into devshell.
The second patch is to clean up some trailing whitespaces in
devshell.bbclass.

Thanks,
Rebecca


Chang Rebecca Swee Fun (2):
  devshell.bbclass: ensure toolchains available for do_devshell
  devshell.bbclass: clean up trailing whitespaces

 meta/classes/devshell.bbclass | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

-- 
2.7.4



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

* [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell
  2017-05-29  5:16 [PATCH 0/2] devshell: make sure toolchains are populated in sysroot Chang Rebecca Swee Fun
@ 2017-05-29  5:16 ` Chang Rebecca Swee Fun
  2017-05-29 23:31   ` Richard Purdie
  2017-05-29  5:16 ` [PATCH 2/2] devshell.bbclass: clean up trailing whitespaces Chang Rebecca Swee Fun
  1 sibling, 1 reply; 6+ messages in thread
From: Chang Rebecca Swee Fun @ 2017-05-29  5:16 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List

Toolchains are required to be prepopulated in sysroot before
entering devshell.

[YOCTO #11464]

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
---
 meta/classes/devshell.bbclass | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index 4de7ea6..770dcbd 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -32,7 +32,16 @@ python () {
        # can't manipulate the environment and variables here yet (see YOCTO #4795)
        d.setVarFlag("do_devshell", "manualfakeroot", "1")
        d.delVarFlag("do_devshell", "fakeroot")
-} 
+
+    # We need to ensure that the toolchains are available in the sysroot
+    # when running devshell (see YOCTO #11464)
+    # We get the dependency for do_configure depends varflag and DEPENDS
+    # variable, then append it to do_devshell depends varflag
+    deps = d.getVarFlag('do_configure', 'depends') or ""
+    for x in bb.utils.explode_deps(d.getVar('DEPENDS') or ""):
+        deps += ' %s:do_populate_sysroot' % x
+    d.appendVarFlag('do_devshell', 'depends', deps)
+}
 
 def devpyshell(d):
 
-- 
2.7.4



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

* [PATCH 2/2] devshell.bbclass: clean up trailing whitespaces
  2017-05-29  5:16 [PATCH 0/2] devshell: make sure toolchains are populated in sysroot Chang Rebecca Swee Fun
  2017-05-29  5:16 ` [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell Chang Rebecca Swee Fun
@ 2017-05-29  5:16 ` Chang Rebecca Swee Fun
  1 sibling, 0 replies; 6+ messages in thread
From: Chang Rebecca Swee Fun @ 2017-05-29  5:16 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
---
 meta/classes/devshell.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index 770dcbd..829c54c 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -8,7 +8,7 @@ python do_devshell () {
        fakeenv = d.getVar("FAKEROOTENV").split()
        for f in fakeenv:
             k = f.split("=")
-            d.setVar(k[0], k[1])           
+            d.setVar(k[0], k[1])
             d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0])
        d.delVarFlag("do_devshell", "fakeroot")
 
@@ -58,7 +58,7 @@ def devpyshell(d):
         old[3] = old[3] &~ termios.ECHO &~ termios.ICANON
         # &~ termios.ISIG
         termios.tcsetattr(fd, termios.TCSADRAIN, old)
-    
+
     # No echo or buffering over the pty
     noechoicanon(s)
 
@@ -154,7 +154,7 @@ python do_devpyshell() {
     try:
         devpyshell(d)
     except SystemExit:
-        # Stop the SIGTERM above causing an error exit code    
+        # Stop the SIGTERM above causing an error exit code
         return
     finally:
         return
-- 
2.7.4



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

* Re: [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell
  2017-05-29  5:16 ` [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell Chang Rebecca Swee Fun
@ 2017-05-29 23:31   ` Richard Purdie
  2017-05-30  0:07     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2017-05-29 23:31 UTC (permalink / raw)
  To: Chang Rebecca Swee Fun, OpenEmbedded Core Mailing List; +Cc: Paul Eggleton


On Mon, 2017-05-29 at 13:16 +0800, Chang Rebecca Swee Fun wrote:
> Toolchains are required to be prepopulated in sysroot before
> entering devshell.
> 
> [YOCTO #11464]
> 
> Signed-off-by: Chang Rebecca Swee Fun 
> ---
>  meta/classes/devshell.bbclass | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

This looks awfully complicated and I'm not sure this does much more
than this would:

-addtask devshell after do_patch
+addtask devshell after do_prepare_recipe_sysroot

Can someone explain to me why we want to do the below instead as I
think the effect is the same?

I did read the bug too but that didn't help answer my question.

Yes, this does mean devshell will now trigger a lot of more
dependencies and build but I think the change below would do the same
thing too.

Cheers,

Richard

> diff --git a/meta/classes/devshell.bbclass
> b/meta/classes/devshell.bbclass
> index 4de7ea6..770dcbd 100644
> --- a/meta/classes/devshell.bbclass
> +++ b/meta/classes/devshell.bbclass
> @@ -32,7 +32,16 @@ python () {
>         # can't manipulate the environment and variables here yet
> (see YOCTO #4795)
>         d.setVarFlag("do_devshell", "manualfakeroot", "1")
>         d.delVarFlag("do_devshell", "fakeroot")
> -} 
> +
> +    # We need to ensure that the toolchains are available in the
> sysroot
> +    # when running devshell (see YOCTO #11464)
> +    # We get the dependency for do_configure depends varflag and
> DEPENDS
> +    # variable, then append it to do_devshell depends varflag
> +    deps = d.getVarFlag('do_configure', 'depends') or ""
> +    for x in bb.utils.explode_deps(d.getVar('DEPENDS') or ""):
> +        deps += ' %s:do_populate_sysroot' % x
> +    d.appendVarFlag('do_devshell', 'depends', deps)
> +}
>  
>  def devpyshell(d):
>  
> -- 
> 2.7.4
> 


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

* Re: [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell
  2017-05-29 23:31   ` Richard Purdie
@ 2017-05-30  0:07     ` Paul Eggleton
  2017-05-30  7:41       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2017-05-30  0:07 UTC (permalink / raw)
  To: Richard Purdie; +Cc: OpenEmbedded Core Mailing List

Hi Richard,

On Tuesday, 30 May 2017 11:31:36 AM NZST Richard Purdie wrote:
> On Mon, 2017-05-29 at 13:16 +0800, Chang Rebecca Swee Fun wrote:
> > Toolchains are required to be prepopulated in sysroot before
> > entering devshell.
> > 
> > [YOCTO #11464]
> > 
> > Signed-off-by: Chang Rebecca Swee Fun 
> > ---
> >  meta/classes/devshell.bbclass | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> This looks awfully complicated and I'm not sure this does much more
> than this would:
> 
> -addtask devshell after do_patch
> +addtask devshell after do_prepare_recipe_sysroot
> 
> Can someone explain to me why we want to do the below instead as I
> think the effect is the same?
> 
> I did read the bug too but that didn't help answer my question.
> 
> Yes, this does mean devshell will now trigger a lot of more
> dependencies and build but I think the change below would do the same
> thing too.

I'd suggested the method Rebecca is using in the bug, but you're right, I'm 
not sure why I didn't think of doing as you suggest instead. Presumably 
however since do_prepare_recipe_sysroot doesn't depend on do_patch we would 
still need to depend on that i.e.:

addtask devshell after do_patch do_prepare_recipe_sysroot

Right?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell
  2017-05-30  0:07     ` Paul Eggleton
@ 2017-05-30  7:41       ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2017-05-30  7:41 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: OpenEmbedded Core Mailing List

On Tue, 2017-05-30 at 12:07 +1200, Paul Eggleton wrote:
> Hi Richard,
> 
> On Tuesday, 30 May 2017 11:31:36 AM NZST Richard Purdie wrote:
> > 
> > On Mon, 2017-05-29 at 13:16 +0800, Chang Rebecca Swee Fun wrote:
> > > 
> > > Toolchains are required to be prepopulated in sysroot before
> > > entering devshell.
> > > 
> > > [YOCTO #11464]
> > > 
> > > Signed-off-by: Chang Rebecca Swee Fun 
> > > ---
> > >  meta/classes/devshell.bbclass | 11 ++++++++++-
> > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > This looks awfully complicated and I'm not sure this does much more
> > than this would:
> > 
> > -addtask devshell after do_patch
> > +addtask devshell after do_prepare_recipe_sysroot
> > 
> > Can someone explain to me why we want to do the below instead as I
> > think the effect is the same?
> > 
> > I did read the bug too but that didn't help answer my question.
> > 
> > Yes, this does mean devshell will now trigger a lot of more
> > dependencies and build but I think the change below would do the
> > same
> > thing too.
> I'd suggested the method Rebecca is using in the bug, but you're
> right, I'm 
> not sure why I didn't think of doing as you suggest instead.
> Presumably 
> however since do_prepare_recipe_sysroot doesn't depend on do_patch we
> would 
> still need to depend on that i.e.:
> 
> addtask devshell after do_patch do_prepare_recipe_sysroot
> 
> Right?

Yes, you're right that we still need do_patch too.

Cheers,

Richard





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

end of thread, other threads:[~2017-05-30  7:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29  5:16 [PATCH 0/2] devshell: make sure toolchains are populated in sysroot Chang Rebecca Swee Fun
2017-05-29  5:16 ` [PATCH 1/2] devshell.bbclass: ensure toolchains available for do_devshell Chang Rebecca Swee Fun
2017-05-29 23:31   ` Richard Purdie
2017-05-30  0:07     ` Paul Eggleton
2017-05-30  7:41       ` Richard Purdie
2017-05-29  5:16 ` [PATCH 2/2] devshell.bbclass: clean up trailing whitespaces Chang Rebecca Swee Fun

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.