From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 447A2158091 for ; Mon, 13 Jun 2022 07:44:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 512ADE0990; Mon, 13 Jun 2022 07:44:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07C41E0969 for ; Mon, 13 Jun 2022 07:44:39 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org Cc: William Hubbs , Florian Schmaus Subject: [gentoo-dev] [PATCH] go-module.eclass: undeprecate EGO_SUM Date: Mon, 13 Jun 2022 09:44:11 +0200 Message-Id: <20220613074411.341909-2-flow@gentoo.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220613074411.341909-1-flow@gentoo.org> References: <20220613074411.341909-1-flow@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 235e3552-f6de-4008-95ca-d5d101709490 X-Archives-Hash: 370269f0e1d859c94071e468f17bf5ca Following the gentoo-dev@ mailing list discussion [1], this un-deprecates EGO_SUM. 1: https://archives.gentoo.org/gentoo-dev/message/1a64a8e7694c3ee11cd48a58a95f2faa Signed-off-by: Florian Schmaus --- eclass/go-module.eclass | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index a5dafb45cab8..2e0b7dc1726d 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -25,7 +25,9 @@ # # If the software has a directory named vendor in its # top level directory, the only thing you need to do is inherit the -# eclass. If it doesn't, you need to also create a dependency tarball and +# eclass. If it doesn't, then you either 1) populate EGO_SUM in the ebuild and +# call go-module_set_globals as discussed below or 2) you need to create a +# dependency tarball and # host it somewhere, for example in your dev space. # # Here is an example of how to create a dependency tarball. @@ -52,9 +54,14 @@ # # inherit go-module # +# EGO_SUM=( +# "github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod" +# "github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59" +# ) +# +# go-mdoule_set_globals # SRC_URI="https://github.com/example/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -# Add this line if you have a dependency tarball. -# SRC_URI+=" ${P}-deps.tar.xz" +# SRC_URI+=" ${EGO_SUM_SRC_URI}" # # @CODE @@ -105,11 +112,7 @@ QA_FLAGS_IGNORED='.*' RESTRICT+=" strip" # @ECLASS_VARIABLE: EGO_SUM -# @DEPRECATED: none # @DESCRIPTION: -# This is replaced by a dependency tarball, see above for how to create -# one. -# # This array is based on the contents of the go.sum file from the top # level directory of the software you are packaging. Each entry must be # quoted and contain the first two fields of a line from go.sum. @@ -153,7 +156,6 @@ RESTRICT+=" strip" # go.sum copy of the Hash1 values during building of the package. # @ECLASS_VARIABLE: _GOMODULE_GOPROXY_BASEURI -# @DEPRECATED: none # @DESCRIPTION: # Golang module proxy service to fetch module files from. Note that the module # proxy generally verifies modules via the Hash1 code. @@ -176,7 +178,6 @@ RESTRICT+=" strip" : "${_GOMODULE_GOPROXY_BASEURI:=mirror://goproxy/}" # @ECLASS_VARIABLE: _GOMODULE_GOSUM_REVERSE_MAP -# @DEPRECATED: none # @DESCRIPTION: # Mapping back from Gentoo distfile name to upstream distfile path. # Associative array to avoid O(N*M) performance when populating the GOPROXY @@ -206,7 +207,6 @@ ego() { } # @FUNCTION: go-module_set_globals -# @DEPRECATED: none # @DESCRIPTION: # Convert the information in EGO_SUM for other usage in the ebuild. # - Populates EGO_SUM_SRC_URI that can be added to SRC_URI @@ -297,7 +297,6 @@ go-module_set_globals() { } # @FUNCTION: go-module_setup_proxy -# @DEPRECATED: none # @DESCRIPTION: # If your ebuild redefines src_unpack and uses EGO_SUM you need to call # this function in src_unpack. @@ -341,14 +340,11 @@ go-module_setup_proxy() { # @FUNCTION: go-module_src_unpack # @DESCRIPTION: # If EGO_SUM is set, unpack the base tarball(s) and set up the -# local go proxy. Also warn that this usage is deprecated. +# local go proxy. # - Otherwise, if EGO_VENDOR is set, bail out. # - Otherwise do a normal unpack. go-module_src_unpack() { if [[ "${#EGO_SUM[@]}" -gt 0 ]]; then - eqawarn "This ebuild uses EGO_SUM which is deprecated" - eqawarn "Please migrate to a dependency tarball" - eqawarn "This will become a fatal error in the future" _go-module_src_unpack_gosum elif [[ "${#EGO_VENDOR[@]}" -gt 0 ]]; then eerror "${EBUILD} is using EGO_VENDOR which is no longer supported" @@ -359,7 +355,6 @@ go-module_src_unpack() { } # @FUNCTION: _go-module_src_unpack_gosum -# @DEPRECATED: none # @DESCRIPTION: # Populate a GOPROXY directory hierarchy with distfiles from EGO_SUM and # unpack the base distfiles. @@ -405,7 +400,6 @@ _go-module_src_unpack_gosum() { } # @FUNCTION: _go-module_gosum_synthesize_files -# @DEPRECATED: none # @DESCRIPTION: # Given a path & version, populate all Goproxy metadata files which aren't # needed to be downloaded directly. @@ -433,7 +427,6 @@ _go-module_gosum_synthesize_files() { } # @FUNCTION: _go-module_src_unpack_verify_gosum -# @DEPRECATED: none # @DESCRIPTION: # Validate the Go modules declared by EGO_SUM are sufficient to cover building # the package, without actually building it yet. @@ -482,7 +475,6 @@ go-module_live_vendor() { } # @FUNCTION: _go-module_gomod_encode -# @DEPRECATED: none # @DESCRIPTION: # Encode the name(path) of a Golang module in the format expected by Goproxy. # -- 2.35.1