Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: mgorny@g.o, floppym@g.o
Subject: Re: [gentoo-dev] Jvcs-snapshot.eclass: add a way to specify the extraction path
Date: Fri, 31 Jul 2015 14:44:47
Message-Id: 20150731144435.GA19635@linux1.gaikai.biz
In Reply to: Re: [gentoo-dev] vcs-snapshot.eclass: add a way to specify the extraction path by Mike Gilbert
1 On Thu, Jul 30, 2015 at 05:11:20PM -0400, Mike Gilbert wrote:
2 > On Thu, Jul 30, 2015 at 11:57 AM, William Hubbs <williamh@g.o> wrote:
3 > > All,
4 > >
5 > > I'm finding in working on Go ebuilds, that we are propegating a
6 > > src_unpack function that is very similar to the one in vcs-snapshot.
7 > >
8 > > This patch adds an EXTRACT_PATH variable to the vcs-snapshot eclass
9 > > which, if set, puts the extracted archives in the specified directory under ${S}.
10 > >
11 > > If it is not set, nothing should happen.
12 > >
13 > > This could be used by other types of ebuilds later, but for now it would
14 > > be used by Go ebuilds.
15 > >
16 > > Thoughts?
17 >
18 > Can you provide an example of an ebuild in the tree for which this
19 > would be useful?
20
21 Sure,
22
23 Take a look at dev-go/go-snappy and most of the dev-go ebuilds.
24
25 They use a src_unpack function for the non-live side that is almost
26 exactly like vcs-snapshot except for the extraction location.
27
28 > I'm unclear as to why tarballs are being unpacked in sub-directories of ${S}.
29
30 For Go software that just uses the Go tools to build, it is easiest to
31 work with if you treat ${S} as a Go Workspace [1].
32
33 I could write my own golang-vcs-snapshot.eclass that does this, but I
34 thought it would be easier to leverage code that is already in the tree.
35
36 William
37
38 [1] https://golang.org/doc/code.html#Workspaces

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies