From owner-svn-ports-head@freebsd.org Sat Dec 16 08:53:09 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AA2CEA18EA; Sat, 16 Dec 2017 08:53:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id DBDBF7D0BF; Sat, 16 Dec 2017 08:53:08 +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 vBG8r76P086137; Sat, 16 Dec 2017 08:53:07 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBG8r7KR086136; Sat, 16 Dec 2017 08:53:07 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201712160853.vBG8r7KR086136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Sat, 16 Dec 2017 08:53:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r456460 - head/Mk/Scripts X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Scripts X-SVN-Commit-Revision: 456460 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 08:53:09 -0000 Author: mat Date: Sat Dec 16 08:53:07 2017 New Revision: 456460 URL: https://svnweb.freebsd.org/changeset/ports/456460 Log: Fix a edge case in the fetch related targets. This would have given an error when: - The port uses DIST_SUBDIR - That sub-directory does not exist - The current user does not have permission to write in DISTDIR. Something like: $ sudo rmdir /usr/ports/distfiles/gallery2 $ make fetch-urlall-list mkdir: /usr/ports/distfiles/gallery2: Permission denied *** Error code 1 PR: 222819 Reported by: sunpoet Sponsored by: Absolight Modified: head/Mk/Scripts/do-fetch.sh (contents, props changed) Modified: head/Mk/Scripts/do-fetch.sh ============================================================================== --- head/Mk/Scripts/do-fetch.sh Sat Dec 16 08:37:17 2017 (r456459) +++ head/Mk/Scripts/do-fetch.sh Sat Dec 16 08:53:07 2017 (r456460) @@ -17,10 +17,14 @@ validate_env dp_DEVELOPER dp_DISABLE_SIZE dp_DISTDIR d set -u -if [ ! -d "${dp_DISTDIR}" ]; then - mkdir -p "${dp_DISTDIR}" -fi -cd "${dp_DISTDIR}" +case ${dp_TARGET} in + do-fetch|makesum) + if [ ! -d "${dp_DISTDIR}" ]; then + mkdir -p "${dp_DISTDIR}" + fi + cd "${dp_DISTDIR}" + ;; +esac for _file in "${@}"; do file=${_file%%:*}