1 |
On Wed, Apr 01, 2020 at 12:50:56PM +0100, Samuel Bernardo wrote: |
2 |
> Hi Robin, |
3 |
> |
4 |
> On 4/1/20 6:36 AM, Robin H. Johnson wrote: |
5 |
> > Samuel: |
6 |
> > I already proved that using go-module.eclass EGO_SUM it will NOT use Git |
7 |
> > repositories, and all of the fetching will happen long before |
8 |
> > src_unpack. Why do you persist with your statement to the contrary? |
9 |
> |
10 |
> Sorry my misunderstanding, but I didn't get it right with what you |
11 |
> mentioned to me before: |
12 |
> |
13 |
> > Have you looked at the EGO_SUM in go-module? This already covers ANY go |
14 |
> > package that uses go.mod + go.sum, in a fully reproducible way that does |
15 |
> > not break network sandbox. |
16 |
> I looked into the eclass documentation and I only found EGO_VENDOR[1]. |
17 |
> This seems so expensive since I need to parse all go.mod or go.sum files |
18 |
> that I concluded would be better to use a tar.gz with all dependencies |
19 |
> (remember that my use case is with my personal overlay). |
20 |
Thanks, it seems the eclass HTML documentation is not updating |
21 |
correctly (it's showing the content of the eclass-manpages-20200213 |
22 |
version right now, despite the "Updated: Apr 2020" text). I've pushed a |
23 |
change and the corrected documentation is now visible. |
24 |
Thank you for bringing this to our attention. |
25 |
|
26 |
> Looking deeply into the source code I could find more details about |
27 |
> EGO_SUM that only needs to set the urls to go.mod or/and go.sum files |
28 |
> present in the repository. This is useful, but only to official gentoo |
29 |
> developers, since if I want to use my own mirror type, for instance |
30 |
> mirror://gooverlay, I wouldn't have that option[3]: |
31 |
You don't need to override _GOMODULE_GOPROXY_BASEURI at all. |
32 |
|
33 |
_GOMODULE_GOPROXY_BASEURI (with the default of mirror://goproxy/) |
34 |
expands to the UPSTREAM locations that have the Go modules available. |
35 |
|
36 |
It expects those mirrors to have the layout of files used by upstream. |
37 |
|
38 |
> > # I am considering removing this and just hard coding mirror://goproxy |
39 |
> > # below, so please do not rely on it. |
40 |
> > : "${_GOMODULE_GOPROXY_BASEURI:=mirror://goproxy/}"| |
41 |
> So, go-module.eclass provides a good base to follow SRP pattern (single |
42 |
> responsibility principle). Looking into that effort I would copy |
43 |
> go-module.eclass to my overlay eclass directory and adapt it to use my |
44 |
> mirror type. |
45 |
> |
46 |
> I would like to use directly Gentoo maintained go-module.eclass, but for |
47 |
> that I would like to have access to set my own mirror type. |
48 |
> |
49 |
> I also ask you to update documentation since there is some details to |
50 |
> use EGO_SUM, such as you stated in comment[4]. |
51 |
It's not clear why you need to modify the mirror behavior at all; maybe |
52 |
you covered that elsewhere in this overly long thread. |
53 |
|
54 |
-- |
55 |
Robin Hugh Johnson |
56 |
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer |
57 |
E-Mail : robbat2@g.o |
58 |
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 |
59 |
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136 |