On 24-02-23, Marco Felsch wrote:
> On 24-02-23, Richard Purdie wrote:
> > On Fri, 2024-02-23 at 13:10 +0100, Marco Felsch wrote:
> > > The fetch stage should always start with a clean ${S} directory to
> > > not
> > > try to compile leftovers from previous builds.
> > > 
> > > Signed-off-by: Marco Felsch <[email protected]>
> > > ---
> > >  meta/classes-recipe/devicetree.bbclass | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/meta/classes-recipe/devicetree.bbclass b/meta/classes-
> > > recipe/devicetree.bbclass
> > > index bd50d7fa1d38..655460a9dbef 100644
> > > --- a/meta/classes-recipe/devicetree.bbclass
> > > +++ b/meta/classes-recipe/devicetree.bbclass
> > > @@ -77,6 +77,8 @@ python () {
> > >          d.appendVarFlag("do_compile", "depends", "
> > > virtual/kernel:do_configure")
> > >  }
> > >  
> > > +do_fetch[cleandirs] = "${S}"
> > > +
> > >  def expand_includes(varname, d):
> > >      import glob
> > >      includes = set()
> > > 
> > 
> > This doesn't make sense. do_fetch works with the fetcher in directories
> > outside WORKDIR. The sources only become available at do_unpack. The
> > correct task would therefore be unpack.
> 
> Good to know, what I inspect is that old dts(i) files are still present
> once I adapted the SRC_URI path e.g:
> 
> SRC_URI = "a.dts b.dts"
> 
> to
> 
> SRC_URI = "b.dts"
> 
> and so this class tries to compile both, albeit I explicite removed
> a.dts from SRC_URI.
> 
> Regards,
>   Marco
> 
> 
> 
> > 
> > This is then covered by base.bbclass:
> > 
> > meta/classes-global/base.bbclass:do_unpack[cleandirs] = "${@d.getVar('S') 
> > if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) 
> > else os.path.join('${S}', 'patches')}"

To answer myself, the issue is that the class does the following:

S = "${WORKDIR}"

so the cleandirs command point to the wrong dir.

Regards,
  Marco
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196083): 
https://lists.openembedded.org/g/openembedded-core/message/196083
Mute This Topic: https://lists.openembedded.org/mt/104526882/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to