mbox series

[v3,0/3] devtool: modify: add support for multiple source

Message ID 20240123140651.930307-1-jstephan@baylibre.com
Headers show
Series devtool: modify: add support for multiple source | expand

Message

Julien Stephan Jan. 23, 2024, 2:06 p.m. UTC
Hello all,

As we discussed in #15162, I tried to implement a devtool unpack tracer.
I did manage to get a list of files unpacked after do_unpack and
manually copy them into WORKDIR but: 
- unpack tracer just tells us the url and the unpack dir, but does not
  directly give the unpacked files. Of course we can get the list by 
  looking at files in the temporary workdir directory at the beginning
  and the end of unpack, but I guess we can also do that without the
  unpack tracer mechanism
- the issue we are trying to fix here, is to get the secondary sources.
  We can obviously use the unpack tracer for that, but the main source,
  and local files (file://) are already correctly handled, so we would 
  end up handling different parts of SRC_URI in different location..
  IMHO the unpack tracer should handle all the src_uri entries itself
  but it means a more global code refactor.

Moreover, it turns out that the issue we are trying to solve was already known
and externalsrc class can handle secondary sources. The fix was
introduced with:
  da1bcf08089 - devtool: add support for multiple git url inside a cargo based recipe <Frederic Martinsons>
We can modify the problematic recipes by adding "type=git-dependency"
on the src_uri entries of the dependencies (secondary sources).

So, I am sending a patch to automatically add the "type=git-dependency"
on secondary sources when a recipe is under devtool control by modifying
the SRC_URI inside the append recipe (in build/workspace/appends/)

Doing that, I tested my work with the bzip2 recipe and found another
bug on do_populate_lic dependency. I added a patch to this series
because otherwise the selftest will not work, but it can be applied
separately.

Cheers
Julien

Julien Stephan (3):
  externalsrc: fix task dependency for do_populate_lic
  devtool: modify: add support for multiple source in SRC_URI
  oeqa/selftest/devtool: add test for recipes with multiple sources in
    SRC_URI

 meta/classes/externalsrc.bbclass        |  1 +
 meta/lib/oeqa/selftest/cases/devtool.py | 26 +++++++++++++++++++++++++
 scripts/lib/devtool/standard.py         | 20 +++++++++++++++++++
 3 files changed, 47 insertions(+)