svn commit: r456460 - head/Mk/Scripts
Mathieu Arnold
mat at FreeBSD.org
Sat Dec 16 08:53:09 UTC 2017
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%%:*}
More information about the svn-ports-all
mailing list