svn commit: r507705 - head/Mk/Scripts
Mathieu Arnold
mat at FreeBSD.org
Wed Jul 31 10:10:36 UTC 2019
Author: mat
Date: Wed Jul 31 10:10:35 2019
New Revision: 507705
URL: https://svnweb.freebsd.org/changeset/ports/507705
Log:
Fix fetch-list when running as a user.
The fetch-list target is used to generate a shell script that will more
or less replicates what do-fetch does. It allows one to do most things
as a regular user, and generate that script to run, say, on another
machine, if the one where you build things does not have access to the
internet, or has much slower access.
It was failing when DISTDIR was not writable by the current user, and
the port had a distribution file with a path in it. (Not using
DIST_SUBDIR, something else, like lang/rust does.) It was failing
because it was trying to create that subdirectory unconditionally,
instead of only creating the subdirectory if actually had to. This also
fixes the bug that the generated script did not have the appropriate
mkdirs for those directories.
PR: 239293
Submitted by: tobik (earlier version)
Reported by: Ruslan Garipov
Differential Revision: https://reviews.freebsd.org/D21112
Modified:
head/Mk/Scripts/do-fetch.sh (contents, props changed)
Modified: head/Mk/Scripts/do-fetch.sh
==============================================================================
--- head/Mk/Scripts/do-fetch.sh Wed Jul 31 09:07:54 2019 (r507704)
+++ head/Mk/Scripts/do-fetch.sh Wed Jul 31 10:10:35 2019 (r507705)
@@ -126,7 +126,14 @@ for _file in "${@}"; do
# There is a lot of escaping, but the " needs to survive echo/eval.
case ${file} in
*/*)
- mkdir -p "${file%/*}"
+ case ${dp_TARGET} in
+ fetch-list|fetch-url-list-int)
+ echo "mkdir -p \"${file%/*}\" && "
+ ;;
+ *)
+ mkdir -p "${file%/*}"
+ ;;
+ esac
args="-o ${file} ${site}${file}"
;;
*)
More information about the svn-ports-head
mailing list