dev-lang/go: add way to have portage rebuild software written in Go

This adds the @golang-rebuild set to portage to allow rebuilding all
known Go software in the tree.

This change only affects the live ebuild, but I will be adding it to
other versions.

Signed-off-by: William Hubbs <williamh@gentoo.org>
This commit is contained in:
William Hubbs
2020-12-06 19:41:03 -06:00
parent afee25ad37
commit 3262576e57
2 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
# Installed packages that inherit from known Go related eclasses.
# This is useful after a dev-lang/go version change to rebuild all
# software written in Go.
[golang-rebuild]
class = portage.sets.dbapi.VariableSet
variable = INHERITED
includes = golang-base golang-build golang-vcs golang-vcs-snapshot go-module

View File

@@ -178,6 +178,10 @@ src_install()
done
einstalldocs
# install the @golang-rebuild set for Portage
insinto /usr/share/portage/config/sets
newins "${FILESDIR}"/go-sets.conf go.conf
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name for test object (binutils_test) on Darwin, it
# is never used in real circumstances
@@ -189,8 +193,6 @@ src_install()
pkg_postinst() {
[[ -z ${REPLACING_VERSIONS} ]] && return
has_version "<sys-apps/portage-3.0.9" && return
einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
einfo "due to the static linking nature of go."