1 |
On Monday, September 9, 2019 2:46:16 PM PDT William Hubbs wrote: |
2 |
> On Tue, Sep 10, 2019 at 08:35:17AM +1200, Kent Fredric wrote: |
3 |
> > On Mon, 9 Sep 2019 12:34:18 -0500 |
4 |
> > |
5 |
> > William Hubbs <williamh@g.o> wrote: |
6 |
> > > There is another option I want to try which is adding "go mod vendor" to |
7 |
> > > src_unpack for go packages. |
8 |
> > |
9 |
> > Is it infeasible to write a tool that you execute as a maintainer, that |
10 |
> > simulates what "go mod vendor" would do, but instead emits a list of |
11 |
> > entries for SRC_URI, and then have an eclass or something construct the |
12 |
> > vendor dir from those? |
13 |
> > |
14 |
> > That's what is available for rust stuff. |
15 |
> |
16 |
> I'm not sure how feasible something like that is. |
17 |
> |
18 |
> $ go list -m all |
19 |
> |
20 |
> will list the dependencies of a module, but that doesn't look like it |
21 |
> can be translated into src_uri format. |
22 |
> |
23 |
> You would basically have to parse go.mod exactly the way upstream does |
24 |
> it and come up with a way to download the correct versions of the |
25 |
> source. |
26 |
> |
27 |
> William |
28 |
|
29 |
check mail-client/aerc ebuild. |
30 |
I use "go list -m all" and manually format EGO_VENDOR string which will be |
31 |
translated into SRC_URI by eclass. |
32 |
tool is certainly possible and should be quite easy to implement. |
33 |
some manual editing will still be needed if dealing with forked packages/ |
34 |
repos, but looks pretty straightforward. |
35 |
This is very similar approach to cargo ebuilds and it supports offline |
36 |
installs, PM checksumming and does not require packaging every single go |
37 |
dependency as a package. |