1 |
Following the gentoo-dev@ mailing list discussion [1], this |
2 |
un-deprecates EGO_SUM. |
3 |
|
4 |
1: https://archives.gentoo.org/gentoo-dev/message/1a64a8e7694c3ee11cd48a58a95f2faa |
5 |
|
6 |
Signed-off-by: Florian Schmaus <flow@g.o> |
7 |
--- |
8 |
eclass/go-module.eclass | 30 +++++++++++------------------- |
9 |
1 file changed, 11 insertions(+), 19 deletions(-) |
10 |
|
11 |
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass |
12 |
index a5dafb45cab8..2e0b7dc1726d 100644 |
13 |
--- a/eclass/go-module.eclass |
14 |
+++ b/eclass/go-module.eclass |
15 |
@@ -25,7 +25,9 @@ |
16 |
# |
17 |
# If the software has a directory named vendor in its |
18 |
# top level directory, the only thing you need to do is inherit the |
19 |
-# eclass. If it doesn't, you need to also create a dependency tarball and |
20 |
+# eclass. If it doesn't, then you either 1) populate EGO_SUM in the ebuild and |
21 |
+# call go-module_set_globals as discussed below or 2) you need to create a |
22 |
+# dependency tarball and |
23 |
# host it somewhere, for example in your dev space. |
24 |
# |
25 |
# Here is an example of how to create a dependency tarball. |
26 |
@@ -52,9 +54,14 @@ |
27 |
# |
28 |
# inherit go-module |
29 |
# |
30 |
+# EGO_SUM=( |
31 |
+# "github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod" |
32 |
+# "github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59" |
33 |
+# ) |
34 |
+# |
35 |
+# go-mdoule_set_globals |
36 |
# SRC_URI="https://github.com/example/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
37 |
-# Add this line if you have a dependency tarball. |
38 |
-# SRC_URI+=" ${P}-deps.tar.xz" |
39 |
+# SRC_URI+=" ${EGO_SUM_SRC_URI}" |
40 |
# |
41 |
# @CODE |
42 |
|
43 |
@@ -105,11 +112,7 @@ QA_FLAGS_IGNORED='.*' |
44 |
RESTRICT+=" strip" |
45 |
|
46 |
# @ECLASS_VARIABLE: EGO_SUM |
47 |
-# @DEPRECATED: none |
48 |
# @DESCRIPTION: |
49 |
-# This is replaced by a dependency tarball, see above for how to create |
50 |
-# one. |
51 |
-# |
52 |
# This array is based on the contents of the go.sum file from the top |
53 |
# level directory of the software you are packaging. Each entry must be |
54 |
# quoted and contain the first two fields of a line from go.sum. |
55 |
@@ -153,7 +156,6 @@ RESTRICT+=" strip" |
56 |
# go.sum copy of the Hash1 values during building of the package. |
57 |
|
58 |
# @ECLASS_VARIABLE: _GOMODULE_GOPROXY_BASEURI |
59 |
-# @DEPRECATED: none |
60 |
# @DESCRIPTION: |
61 |
# Golang module proxy service to fetch module files from. Note that the module |
62 |
# proxy generally verifies modules via the Hash1 code. |
63 |
@@ -176,7 +178,6 @@ RESTRICT+=" strip" |
64 |
: "${_GOMODULE_GOPROXY_BASEURI:=mirror://goproxy/}" |
65 |
|
66 |
# @ECLASS_VARIABLE: _GOMODULE_GOSUM_REVERSE_MAP |
67 |
-# @DEPRECATED: none |
68 |
# @DESCRIPTION: |
69 |
# Mapping back from Gentoo distfile name to upstream distfile path. |
70 |
# Associative array to avoid O(N*M) performance when populating the GOPROXY |
71 |
@@ -206,7 +207,6 @@ ego() { |
72 |
} |
73 |
|
74 |
# @FUNCTION: go-module_set_globals |
75 |
-# @DEPRECATED: none |
76 |
# @DESCRIPTION: |
77 |
# Convert the information in EGO_SUM for other usage in the ebuild. |
78 |
# - Populates EGO_SUM_SRC_URI that can be added to SRC_URI |
79 |
@@ -297,7 +297,6 @@ go-module_set_globals() { |
80 |
} |
81 |
|
82 |
# @FUNCTION: go-module_setup_proxy |
83 |
-# @DEPRECATED: none |
84 |
# @DESCRIPTION: |
85 |
# If your ebuild redefines src_unpack and uses EGO_SUM you need to call |
86 |
# this function in src_unpack. |
87 |
@@ -341,14 +340,11 @@ go-module_setup_proxy() { |
88 |
# @FUNCTION: go-module_src_unpack |
89 |
# @DESCRIPTION: |
90 |
# If EGO_SUM is set, unpack the base tarball(s) and set up the |
91 |
-# local go proxy. Also warn that this usage is deprecated. |
92 |
+# local go proxy. |
93 |
# - Otherwise, if EGO_VENDOR is set, bail out. |
94 |
# - Otherwise do a normal unpack. |
95 |
go-module_src_unpack() { |
96 |
if [[ "${#EGO_SUM[@]}" -gt 0 ]]; then |
97 |
- eqawarn "This ebuild uses EGO_SUM which is deprecated" |
98 |
- eqawarn "Please migrate to a dependency tarball" |
99 |
- eqawarn "This will become a fatal error in the future" |
100 |
_go-module_src_unpack_gosum |
101 |
elif [[ "${#EGO_VENDOR[@]}" -gt 0 ]]; then |
102 |
eerror "${EBUILD} is using EGO_VENDOR which is no longer supported" |
103 |
@@ -359,7 +355,6 @@ go-module_src_unpack() { |
104 |
} |
105 |
|
106 |
# @FUNCTION: _go-module_src_unpack_gosum |
107 |
-# @DEPRECATED: none |
108 |
# @DESCRIPTION: |
109 |
# Populate a GOPROXY directory hierarchy with distfiles from EGO_SUM and |
110 |
# unpack the base distfiles. |
111 |
@@ -405,7 +400,6 @@ _go-module_src_unpack_gosum() { |
112 |
} |
113 |
|
114 |
# @FUNCTION: _go-module_gosum_synthesize_files |
115 |
-# @DEPRECATED: none |
116 |
# @DESCRIPTION: |
117 |
# Given a path & version, populate all Goproxy metadata files which aren't |
118 |
# needed to be downloaded directly. |
119 |
@@ -433,7 +427,6 @@ _go-module_gosum_synthesize_files() { |
120 |
} |
121 |
|
122 |
# @FUNCTION: _go-module_src_unpack_verify_gosum |
123 |
-# @DEPRECATED: none |
124 |
# @DESCRIPTION: |
125 |
# Validate the Go modules declared by EGO_SUM are sufficient to cover building |
126 |
# the package, without actually building it yet. |
127 |
@@ -482,7 +475,6 @@ go-module_live_vendor() { |
128 |
} |
129 |
|
130 |
# @FUNCTION: _go-module_gomod_encode |
131 |
-# @DEPRECATED: none |
132 |
# @DESCRIPTION: |
133 |
# Encode the name(path) of a Golang module in the format expected by Goproxy. |
134 |
# |
135 |
-- |
136 |
2.35.1 |