"Amitai Schleier" <schmonz%schmonz.com@localhost> writes:
> I propose the following small change:
>
> -----
>
> The non-writability check for DISTDIR is intended to prevent wasting
> resources when fetchers wouldn't be able to save what they download. On
> my build farm with pkgsrc (and pkgsrc/distfiles) mounted over NFS,
> however, the check gives false positives for NetBSD 9.2 and -current.
> Downgrade it to a warning so that these fetches can succeed, while
> leaving a breadcrumb in case someone encounters a true positive.
>
> It would of course be interesting to sort out why, in my environment, a
> wide variety of other OSes get 1 for "${TEST} ! -w $fetchdir" while
> NetBSD gets 0.
>
> Index: mk/fetch/fetch
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/fetch/fetch,v
> retrieving revision 1.20
> diff -u -r1.20 fetch
> --- mk/fetch/fetch 27 Aug 2020 11:45:45 -0000 1.20
> +++ mk/fetch/fetch 14 Dec 2021 18:09:58 -0000
> @@ -228,10 +228,8 @@
> fi
>
> ${TEST} -d $fetchdir || ${MKDIR} -p $fetchdir 2>/dev/null
> -if ${TEST} ! -w $fetchdir; then
> - ${ECHO} 1>&2 "$self: Cannot write to `cd $fetchdir && pwd`"
> - exit 1
> -fi
> +
> +${TEST} -w $fetchdir || ${ECHO} 1>&2 "$self: WARNING: DISTDIR `cd
> $fetchdir && pwd` looks non-writable."
>
> # Set the name of the output file. In the "resume" case, we
> initialize
> # the fetch loop by ensuring that the temporary output file already
I haven't seen any on-list objections.
It seems like there is some underlying bug in the remote filesystem
code, but in pkgsrc we work around trouble all the time.
I don't see this change as likely to cause problems. It's also easy to
back out if so, so I don't mind if you commit it.
Attachment:
signature.asc
Description: PGP signature