Skip to content

Make source code browsable locally - devtool srctree

Tobias Hagelborn openembedded-core 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 7 repliesSuperseded
  3. v12 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2srctree.bbclass: Download sourcecode and make it searchablemeta/classes/srctree.bbclass+90 -00 replies
2/2devtool: srctree: New command for setting up browsable source-codescripts/lib/devtool/srctree.py+87 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] Make source code browsable locally - devtool srctree

UPDATE v2:
- Moved default output dir to ${TMPDIR}/srctree
- Retested on Pyro master (core-image-sato/core-image-minimal)

In our organization, there is a demand to be able to download source code for searching. With the use of sstate-cache this has been challenge. Also, the source is not gathered but rather spread in a larger directory structure together with build output. There are probably others that also want to be able to do the same.

This addition does:
* Force download of all source via the srctree_all task
* Symlink the source together in a separate directory structure for easier search without the risk of matching with build output.

This is achived with a new class srctree.bbclass that implements the needed tasks and a devtool command srctree which offers a convenience command to set up source for a recipe and it's dependencies.

There is also a way of organising the package source code in your own way. This is done by implementing a custom dir generation function and assign to SRCTREE_PN_PATH in a custom class and set SRCTREE_EXTENSION in a configuration file.

Tobias Hagelborn (2):
srctree.bbclass: Download sourcecode and make it searchable
devtool: srctree: New command for setting up browsable source-code

 meta/classes/srctree.bbclass   | 90 ++++++++++++++++++++++++++++++++++++++++++
 scripts/lib/devtool/srctree.py | 87 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)
 create mode 100644 meta/classes/srctree.bbclass
 create mode 100644 scripts/lib/devtool/srctree.py
Signature · 1 line
2.1.4