summaryrefslogtreecommitdiff
path: root/bootstrap/bootstrap
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2019-09-13 20:10:35 +0000
committerrillig <rillig@pkgsrc.org>2019-09-13 20:10:35 +0000
commit989b6f152768b60614a4cb7dd61564de9521f1fb (patch)
tree8787562a97a6a884f8001dfd72e02b971fcaea09 /bootstrap/bootstrap
parentcb8a067f401ae85fda708c2d77873800a1c8d93d (diff)
downloadpkgsrc-989b6f152768b60614a4cb7dd61564de9521f1fb.tar.gz
bootstrap/bootstrap: prevent --wrkdir from being a symlink
Without this check, bootstrap will fail later when it builds bootstrap-mk-files in the usual pkgsrc way. There is an additional check in bsd.pkg.mk which then fails. Therefore, better fail fast to save some time.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-xbootstrap/bootstrap7
1 files changed, 3 insertions, 4 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 4aee1b45fdd..e27a923597b 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.270 2019/09/13 19:53:03 rillig Exp $
+# $NetBSD: bootstrap,v 1.271 2019/09/13 20:10:35 rillig Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@@ -358,8 +358,7 @@ checkarg_sane_absolute_path()
*/) die "ERROR: The argument to $2 must not end in /." ;;
*//* | */. | */./* | */.. | */../*)
die "ERROR: The path $1 (from $2) must be canonical." ;;
- /*) [ "${3-}" = "may-be-symlink" ] \
- || checkarg_no_symlink_path "$1" "$2" ;;
+ /*) checkarg_no_symlink_path "$1" "$2" ;;
*) die "ERROR: The argument to $2 must be an absolute path." ;;
esac
}
@@ -511,7 +510,7 @@ checkarg_sane_absolute_path "$sysconfdir" "--sysconfdir"
checkarg_sane_absolute_path "$varbase" "--varbase"
checkarg_sane_relative_path "$pkginfodir" "--pkginfodir"
checkarg_sane_relative_path "$pkgmandir" "--pkgmandir"
-checkarg_sane_absolute_path "$wrkdir" "--workdir" may-be-symlink
+checkarg_sane_absolute_path "$wrkdir" "--workdir"
# set defaults for system locations if not already set by the user
wrkobjdir=${wrkdir}/pkgsrc