Re: Warnings about Mk/Uses/go.mk when building INDEX

From: Moin Rahman <bofh_at_freebsd.org>
Date: Thu, 02 Feb 2023 23:05:08 UTC

> On Feb 2, 2023, at 11:48 PM, Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
> 
> On Thu, 2 Feb 2023 15:09:59 -0500
> Dmitri Goutnik <dmgk@FreeBSD.org> wrote:
> 
>> On 02/02/2023 14:21, Philipp Ost wrote:
>>> Hi everyone,
>>> 
>>> since at least two days, I'm getting these warning when building the INDEX:
>>> 
>>> ----8<----
>>> --- describe.www ---
>>> make[4]: "/usr/ports/Mk/Uses/go.mk" line 192: warning: duplicate script
>>> for target "go-post-fetch" ignored
>>> make[4]: "Makefile" line 35: warning: using previous script for
>>> "go-post-fetch" defined here
>>> make[4]: "/usr/ports/Mk/Uses/go.mk" line 193: warning: duplicate script
>>> for target "go-post-fetch" ignored
>>> make[4]: "Makefile" line 35: warning: using previous script for
>>> "go-post-fetch" defined here
>>> --- describe.x11-clocks ---
>>> ---->8----
>>> 
>>> Is anyone else seeing these warnings?
>>> 
>>> Best
>>> Philipp
>>> 
>> 
>> I was also getting these warnings when bulk building Go ports in Poudriere:
>> 
>> [00:01:16] Warning: (www/gitlab-pages): make: "/usr/ports/Mk/Uses/go.mk"
>> line 192: warning: duplicate script for target "go-post-fetch" ignored
>> [00:01:16] Warning: (www/gitlab-pages): make: "Makefile" line 35:
>> warning: using previous script for "go-post-fetch" defined here
>> [00:01:16] Warning: (www/gitlab-pages): make: "/usr/ports/Mk/Uses/go.mk"
>> line 193: warning: duplicate script for target "go-post-fetch" ignored
>> [00:01:16] Warning: (www/gitlab-pages): make: "Makefile" line 35:
>> warning: using previous script for "go-post-fetch" defined here
>> 
>> www/gitlab-pages/Makefile has a comment on why overriding go-post-fetch
>> was needed.
>> 
>> Best regards,
>> 
>> --
>> Dmitri Goutnik
>> dg@syrec.org | dmgk@FreeBSD.org
> 
> Just a quick check (having not enough time and health):
> 
> 
> % ugrep --binary --with-hex --exclude-dir=.git --exclude-dir=distfiles \
> --exclude-dir=packages -r -n "USES" /usr/ports/www/ | ugrep " go" | \
> cut -f 1 -w | cut -f 1 -d : | xargs fgrep -A 5 -B 5 "go-post-fetch"
> /usr/ports/www/gitlab-workhorse/Makefile-ca_root_nss>0:security/ca_root_nss
> /usr/ports/www/gitlab-workhorse/Makefile-MASTER_SITES+=
> https://gitlab.com/gitlab-org/gitlab-foss/-/raw/v${DISTVERSION}/workhorse/
> /usr/ports/www/gitlab-workhorse/Makefile-DISTFILES+=	go.mod
> /usr/ports/www/gitlab-workhorse/Makefile-DIST_SUBDIR=   go/$
> {PKGORIGIN:S,/,_,g}/${DISTNAME}
> /usr/ports/www/gitlab-workhorse/Makefile-EXTRACT_ONLY+= $
> {DISTFILES:N*.mod\:*:N*.mod:C/:.*//}
> /usr/ports/www/gitlab-workhorse/Makefile:_USES_fetch+=
> 800:go-post-fetch
> /usr/ports/www/gitlab-workhorse/Makefile:go-post-fetch:
> /usr/ports/www/gitlab-workhorse/Makefile-
> @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies";
> /usr/ports/www/gitlab-workhorse/Makefile-       @(cd ${DISTDIR}/$
> {DIST_SUBDIR}; \
> /usr/ports/www/gitlab-workhorse/Makefile-               [ -e go.mod ]
> || ${RLN} ${GO_MODFILE} go.mod; \
> /usr/ports/www/gitlab-workhorse/Makefile-               ${SETENV} $
> {GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all)
> /usr/ports/www/gitlab-workhorse/Makefile-# ---------------------------
> 
> 
> 
> --
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>
> 

For now fixed at 8607332fb8268becd08f7e6cfbc853bc76e2cc43.