[OE-core] [PATCH v2 0/2] Make source code browsable locally - devtool srctree

Peter Kjellerstedt peter.kjellerstedt at axis.com
Thu Aug 31 06:32:42 UTC 2017


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of
> Andre McCurdy
> Sent: den 31 augusti 2017 01:17
> To: Tobias Hagelborn <Tobias.Hagelborn at axis.com>
> Cc: Tobias Hagelborn <Tobias.Hagelborn at axis.com>; OE Core mailing list
> <openembedded-core at lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH v2 0/2] Make source code browsable
> locally - devtool srctree
> 
> On Wed, Aug 30, 2017 at 2:03 AM, Tobias Hagelborn
> <tobias.hagelborn at axis.com> wrote:
> > On 07/07/2017 07:32 AM, Tobias Hagelborn wrote:
> >>
> >> UPDATE v2:
> >> - Rebased on latest Poky
> >> - Fixed issue with bad paths
> >> - Dirname based on $PN
> >>
> >> In our organization, there is a demand to be able 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
> >>
> >
> > Hi
> >
> > I did not receive any feedback on this one.
> >
> > We do make good use of this feature and we can't be the only ones who
> want
> > to browse the source of the distro at times?
> 
> Just for reference, I think you could achieve something quite similar
> with:
> 
>   bitbake <your-image> --runall clean  ( or rm -rf tmp )
>   bitbake <your-image> --runall patch

Yes, but the drawback with this is that to find the source code for the 
individual packages, you have to dive down into tmp/work/... which can 
be quite discouraging for someone who is not an expert in bitbake. What 
our developers requested was a way to get easy access to all the source 
code being used, typically to be able to search through it all looking 
for some specific feature.

> > Cheers
> > Tobias

//Peter




More information about the Openembedded-core mailing list