1 |
On Mon, Aug 3, 2015 at 8:20 PM, William Hubbs <williamh@g.o> wrote: |
2 |
> This eclass is meant to handle vcs snapshots of golang packages coming |
3 |
> from services like github. |
4 |
> |
5 |
> Let me know what you think. |
6 |
> |
7 |
> William |
8 |
> |
9 |
> # The location where the tarball is extracted is defined as |
10 |
> # ${S}/src/${EGO_PN}. |
11 |
> |
12 |
> # @FUNCTION: golang-vcs-snapshot_src_unpack |
13 |
> |
14 |
> # @DESCRIPTION: |
15 |
> # Extract the first archive from ${A} to the appropriate location for GOPATH. |
16 |
> golang-vcs-snapshot_src_unpack() { |
17 |
> local f destdir="${WORKDIR}/${P}" x |
18 |
> ego_pn_check |
19 |
> set -- ${A} |
20 |
> x="$1" |
21 |
> mkdir -p "${destdir}/src/${EGO_PN%/*}" |
22 |
> tar -C "${destdir}/src/${EGO_PN%/*}" -x --strip-components 1 \ |
23 |
> -f "${DISTDIR}/${x}" || die |
24 |
> } |
25 |
|
26 |
The documentation says you are extracting to ${S}, but the function |
27 |
actually extracts to ${WORKDIR}/${PN}. |
28 |
|
29 |
I would get rid of the useless "destdir" variable and replace all |
30 |
usages with "${S}". Or update the docs. |