RE: git: d7d5c9efef03 - main - pkgbase: Let source packages be built in parallel

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 19 Aug 2024 15:12:57 UTC
Mark Johnston <markj_at_FreeBSD.org> wrote on
Date: Mon, 19 Aug 2024 14:37:37 UTC :

> The branch main has been updated by markj:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=d7d5c9efef031aa11a841d1836f7c937dcbe4ec8
> 
> commit d7d5c9efef031aa11a841d1836f7c937dcbe4ec8
> Author: Mark Johnston <markj@FreeBSD.org>
> AuthorDate: 2024-08-19 14:08:05 +0000
> Commit: Mark Johnston <markj@FreeBSD.org>
> CommitDate: 2024-08-19 14:37:27 +0000
> 
> pkgbase: Let source packages be built in parallel
> 
> To build the packages target, we build src and src-sys packages
> containing the source code from which the repo was built. These
> packages take significantly longer than the others, presumably because
> they contain many more files. Because both source packages are built
> to satisfy the same target, they end up being built serially. Split
> them into separate subtargets so that they can run in parallel. This
> saves a couple of minutes on my build machine.
. . .

For parallel execution of the 2 targets below, aren't
the following "rm -f" commands racy relative to the
later *.plist generation activity in each of the
". . ." sections of code ?

create-source-src-package: _pkgbootstrap .PHONY
	rm -f ${SSTAGEDIR}/*.plist 2>/dev/null || :
	. . .
	. . . > ${SSTAGEDIR}/src.plist
	. . .

create-source-src-sys-package: _pkgbootstrap .PHONY
	rm -f ${SSTAGEDIR}/*.plist 2>/dev/null || :
	. . .
	. . . > ${SSTAGEDIR}/src-sys.plist
	. . .

===
Mark Millard
marklmi at yahoo.com