Overview: 'make index' removes INDEX before building INDEX Steps to Reproduce: 1) Run a 'make index'. 2) Interrupt it. Actual Results: INDEX file gone. Expected Results: INDEX file should only be replaced at the point where there's a new INDEX to replace it; essentially, build INDEX.tmp, then swap it in.
Created attachment 159515 [details] Proposed patch
Pending creation of phabricator review
Differential Revision: https://reviews.freebsd.org/D3298
ping! I think it is a good idea.
Patch should updated, line numbers had changed.
Created attachment 207239 [details] patch-usr_ports-Makefile Update patch.
Created attachment 207240 [details] svn-diff-usr_ports_Makefile_v2 Forgot remove one line.
What's the status here? Very frequently, `make fetchindex` retrieves a partial INDEX. Looking at my logs, 18% of my fetchindex runs were aborted due to a truncated INDEX-12.bz2. If this patch will resolve that (will it?), I'm in favor of it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=62f3ada9497ac74c9fe7fe8e4207eebd43af0989 commit 62f3ada9497ac74c9fe7fe8e4207eebd43af0989 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-11-08 12:51:02 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-11-08 12:58:22 +0000 index: keep index file as long as possible When generating the INDEX file, we are already building it in a temporary file and swap it last minute. make the index target now directly depend on the INDEX file generation target. Turn that target into a PHONY target so the file is always regenerated when someone calls make index. PR: 202070 Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)