diff options
author | schmonz <schmonz@pkgsrc.org> | 2021-12-16 14:10:46 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2021-12-16 14:10:46 +0000 |
commit | bea9efa9b201658871a9f3a163c20f5c279112ee (patch) | |
tree | 61aa62fe066af44476d6bf130e36e9aab5dda048 /mk | |
parent | 9227377322ef0d59aeea1ffa9a43d40c440de476 (diff) | |
download | pkgsrc-bea9efa9b201658871a9f3a163c20f5c279112ee.tar.gz |
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. In the meantime, joerg@ suggested this workaround and
gdt@ agrees it's reasonable to try.
Diffstat (limited to 'mk')
-rwxr-xr-x | mk/fetch/fetch | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mk/fetch/fetch b/mk/fetch/fetch index c6eadd51cc2..4c6766ff08f 100755 --- a/mk/fetch/fetch +++ b/mk/fetch/fetch @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: fetch,v 1.20 2020/08/27 11:45:45 jperkin Exp $ +# $NetBSD: fetch,v 1.21 2021/12/16 14:10:46 schmonz Exp $ # # Copyright (c) 2006, 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -228,10 +228,8 @@ if verify_file $path; then 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 |