Date: Wed, 31 Jul 2019 10:10:36 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r507705 - head/Mk/Scripts Message-ID: <201907311010.x6VAAaXB025213@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}" ;; *)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907311010.x6VAAaXB025213>