diff options
author | glewis <glewis@FreeBSD.org> | 2003-08-23 01:07:08 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2003-08-23 01:07:08 +0800 |
commit | f3d35027ab3490690ef18465b0fc3d9ab34ad7d5 (patch) | |
tree | 73b9b00052e054643cd11965da16c452d4966c68 /java | |
parent | 85370b5bf4dcde2025ed052057dcd70b9a41dbf3 (diff) | |
download | freebsd-ports-graphics-f3d35027ab3490690ef18465b0fc3d9ab34ad7d5.tar.gz freebsd-ports-graphics-f3d35027ab3490690ef18465b0fc3d9ab34ad7d5.tar.zst freebsd-ports-graphics-f3d35027ab3490690ef18465b0fc3d9ab34ad7d5.zip |
. Add a script which checks if ${LINUX_BASE}/${WRKDIRPREFIX} is
(possibly indirectly) a symbolic link to ${WRKDIRPREFIX}.
. Use this script in preference to the direct symbolic link check
previously used, as it handles indirections which cause the same
problem.
. /compat/linux -> ${LINUXBASE} in the message output if the check
detects a link.
PR: 43602
Diffstat (limited to 'java')
-rw-r--r-- | java/jdk13/Makefile | 6 | ||||
-rw-r--r-- | java/jdk13/scripts/check_wrkdir_links.sh | 29 |
2 files changed, 31 insertions, 4 deletions
diff --git a/java/jdk13/Makefile b/java/jdk13/Makefile index 9770300aac0..f55b1255723 100644 --- a/java/jdk13/Makefile +++ b/java/jdk13/Makefile @@ -196,12 +196,10 @@ post-patch: .if defined(WITH_LINUX_BOOTSTRAP) || !exists(${PREFIX}/jdk${JDK_VERSION}/bin/javac) # Some checks for bootstrapping with a Linux JDK pre-build: - @if [ "$${WRKDIRPREFIX}" -a \ - -L "/compat/linux/$${WRKDIRPREFIX}" -a \ - x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | awk '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \ + @if [ `${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/check_wrkdir_links.sh "${WRKDIRPREFIX}" "${LINUXBASE}" 2>/dev/null` ]; \ then \ ${ECHO_MSG} "Please set WRKDIRPREFIX to something which doesn't"; \ - ${ECHO_MSG} "have a matching symbolic link in /compat/linux."; \ + ${ECHO_MSG} "have a matching symbolic link in ${LINUXBASE}."; \ ${ECHO_MSG} "This is known to cause problems during bootstrapping."; \ exit 1; \ fi diff --git a/java/jdk13/scripts/check_wrkdir_links.sh b/java/jdk13/scripts/check_wrkdir_links.sh new file mode 100644 index 00000000000..bc09f193921 --- /dev/null +++ b/java/jdk13/scripts/check_wrkdir_links.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# $FreeBSD$ + +WRKDIRPREFIX=$1 +LINUXBASE=$2 + +if [ "x${WRKDIRPREFIX}" = "x" -o "x${LINUXBASE}" = "x" ]; then + exit 0 +fi + +LINUXWRKDIRPREFIX="${LINUXBASE}/${WRKDIRPREFIX}" + +while [ "x${LINUXWRKDIRPREFIX}" != "x" ]; do + if [ -L "${LINUXWRKDIRPREFIX}" -a \ + x`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \ + awk '/->/{print $NF;exit 0}END{exit 1}'` = \ + x"${WRKDIRPREFIX}" ]; then + echo "link" + exit 1 + fi + if [ -L "${LINUXWRKDIRPREFIX}" ]; then + LINUXWRKDIRPREFIX=`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \ + awk '/->/{print $NF;exit 0}END{exit 1}'` + else + break + fi +done + +exit 0 |