Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	 openembedded-core@lists.openembedded.org,
	Stefan Stanacar <sstncr@gmail.com>,
	 "Eggleton, Paul" <paul.eggleton@intel.com>
Subject: Re: [PATCH] classes/externalsrc: Don't delete tasks
Date: Tue, 16 Jan 2018 18:40:00 -0600	[thread overview]
Message-ID: <1516149600.18676.8.camel@gmail.com> (raw)
In-Reply-To: <1515926585.29722.206.camel@linuxfoundation.org>

On Sun, 2018-01-14 at 10:43 +0000, Richard Purdie wrote:
> On Fri, 2018-01-12 at 10:24 -0600, Joshua Watt wrote:
> > Set the noexec flag to prevent tasks from executing instead of
> > deleting
> > them. This allows inter-tasks dependencies on these tasks to still
> > function. For example, perf has the line:
> > 
> >  do_populate_lic[depends] += "virtual/kernel:do_patch"
> > 
> > which will break if the kernel uses EXTERNALSRC and the do_patch
> > task
> > is deleted.
> > 
> > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > ---
> >  meta/classes/externalsrc.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/externalsrc.bbclass
> > b/meta/classes/externalsrc.bbclass
> > index 65dd13ddc1f..12046d74e17 100644
> > --- a/meta/classes/externalsrc.bbclass
> > +++ b/meta/classes/externalsrc.bbclass
> > @@ -102,7 +102,7 @@ python () {
> >          for task in d.getVar("SRCTREECOVEREDTASKS").split():
> >              if local_srcuri and task in fetch_tasks:
> >                  continue
> > -            bb.build.deltask(task, d)
> > +            d.setVarFlag(task, 'noexec', '1')
> >  
> >          d.prependVarFlag('do_compile', 'prefuncs',
> > "externalsrc_compile_prefunc ")
> >          d.prependVarFlag('do_configure', 'prefuncs',
> > "externalsrc_configure_prefunc ")
> 
> There are a few things I worry about with this:
> 
> a) Its confusing for users as it will now show a fetch/unpack/patch
> task as part of the dependency tree but they won't actually run.
> 
> b) Dependencies for those tasks will be followed
> 
> c) There has always been a bit of ambiguity about what should happen
> with task properties like cleandirs, dirs and others. Whilst these
> don't run for noexec, I have worries that somehow we'll end up wiping
> out the external source dir accidentally (e.g. with do_clean). I
> think
> the noexec move makes this more likely, sadly.
> 
> externalsrc started out as a 30 line class back in 2012 and its now
> 235
> lines and getting ridiculously complicated.
> 
> I'm starting to wonder if we should change the approach and have it
> modify SRC_URI and take a copy of the source. Yes, it'd be
> fractionally
> slower but its getting far too complex trying to handle all the
> corner
> cases. It was meant so developers could quickly hack/test things and
> its turning into a full development tool/workflow.

Ya, that seems reasonable. I think the tricky part is getting the data
copied over in such a way that incremental builds still work (which is
99% of the time the reason I use externalsrc), since some build systems
actually care about the timestamps. Hmmm.... maybe something with rsync
would work.... although, it would be a bit of a strange host tool
dependency. 

> 
> I think we do need to take a step back and try and come up with a way
> to simplify it...
> 
> We should also think about whether there are changes to the core
> which
> would make things like this easier. I do have a fairly strong belief
> that we should make the system more robust and able to handle tasks
> being missing, its now a lot better at handling that than it used to
> be. Chris as talked about a "srcready" type task and reworking the
> fetch/unpack/patch process  and I can see the reasoning for that, it
> would help here too.

Another idea I had (dunno if it is actually *good*): perhaps using
EXTERNALSRC should add some thing to OVERRIDES when it is enabled? That
way at least the corner cases can be codified close to the code they
modify instead of having to live generically in externalsrc.bbclass

> 
> Not sure whether Paul has any thoughts on this as externalsrc will
> significantly impact devtool too...

I don't use devtool much, but I do use externalsrc all the time. If I
get a bit of down time, I might try to take a look at it.

> 
> Cheers,
> 
> Richard
> 
> 
> 
> 


  reply	other threads:[~2018-01-17  0:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 16:24 [PATCH] classes/externalsrc: Don't delete tasks Joshua Watt
2018-01-14 10:43 ` Richard Purdie
2018-01-17  0:40   ` Joshua Watt [this message]
2018-01-17  9:54   ` Paul Eggleton

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=1516149600.18676.8.camel@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@intel.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=sstncr@gmail.com \
    /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