From owner-svn-ports-all@freebsd.org Wed Jul 31 10:10:36 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8215BA27B; Wed, 31 Jul 2019 10:10:36 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A06F966C2; Wed, 31 Jul 2019 10:10:36 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 696D127D0B; Wed, 31 Jul 2019 10:10:36 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6VAAaWc025214; Wed, 31 Jul 2019 10:10:36 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6VAAaXB025213; Wed, 31 Jul 2019 10:10:36 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201907311010.x6VAAaXB025213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 31 Jul 2019 10:10:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r507705 - head/Mk/Scripts X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Scripts X-SVN-Commit-Revision: 507705 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9A06F966C2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2019 10:10:36 -0000 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}" ;; *)