]> code.ossystems Code Review - openembedded-core.git/commit
go.bbclass: add do_unpack function to handle common cases
authorMatt Madison <matt@madison.systems>
Fri, 8 Sep 2017 21:04:41 +0000 (18:04 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Sep 2017 16:30:15 +0000 (17:30 +0100)
commitefcf6513b71021ea4bfe6fbaa326e6591dee487d
treece1dfff7d04b6340f219072c2ec68edaffb810cc
parentc62a083306c26b7e4deca1ff41336bb6b33d5b3a
go.bbclass: add do_unpack function to handle common cases

Go source trees have a particular structure, with all
sources located under ${GOROOT}/src/<import-path>.
The fetcher step implemented by the 'go get' command
automatically follows this structure, so we need
to do the same here.

Since most Go packages are hosted in git repositories,
this adds a custom do_unpack() function that sets
the destsuffix to match the expected directory structure,
for any git SRC_URIs that haven't had a destsuffix
explicitly set in the recipe.

This simplifies recipe writing for the most common
cases.

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/go.bbclass