Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2014 15:02:37 +0000 (UTC)
From:      Will Andrews <will@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272363 - head/share/mk
Message-ID:  <201410011502.s91F2bOk036281@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: will
Date: Wed Oct  1 15:02:37 2014
New Revision: 272363
URL: https://svnweb.freebsd.org/changeset/base/272363

Log:
  Always resolve PORTSDIR to absolute paths using realpath(1).
  
  Reported by:	madpilot
  Reviewed by:	bapt
  X-MFC-With:	272282

Modified:
  head/share/mk/bsd.port.mk
  head/share/mk/bsd.port.subdir.mk

Modified: head/share/mk/bsd.port.mk
==============================================================================
--- head/share/mk/bsd.port.mk	Wed Oct  1 15:00:21 2014	(r272362)
+++ head/share/mk/bsd.port.mk	Wed Oct  1 15:02:37 2014	(r272363)
@@ -5,13 +5,13 @@
 # in the default /usr/ports.  The ../../.. case is in case ports ever grows
 # a third level.
 .if exists(${.CURDIR}/Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}
+PORTSDIR!=	realpath ${.CURDIR}
 .elif exists(${.CURDIR}/../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/..
+PORTSDIR!=	realpath ${.CURDIR}/..
 .elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/../..
+PORTSDIR!=	realpath ${.CURDIR}/../..
 .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/../../..
+PORTSDIR!=	realpath ${.CURDIR}/../../..
 .else
 PORTSDIR=	/usr/ports
 .endif

Modified: head/share/mk/bsd.port.subdir.mk
==============================================================================
--- head/share/mk/bsd.port.subdir.mk	Wed Oct  1 15:00:21 2014	(r272362)
+++ head/share/mk/bsd.port.subdir.mk	Wed Oct  1 15:02:37 2014	(r272363)
@@ -5,13 +5,13 @@
 # in the default /usr/ports.  The ../../.. case is in case ports ever grows
 # a third level.
 .if exists(${.CURDIR}/Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}
+PORTSDIR!=	realpath ${.CURDIR}
 .elif exists(${.CURDIR}/../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/..
+PORTSDIR!=	realpath ${.CURDIR}/..
 .elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/../..
+PORTSDIR!=	realpath ${.CURDIR}/../..
 .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
-PORTSDIR=	${.CURDIR}/../../..
+PORTSDIR!=	realpath ${.CURDIR}/../../..
 .else
 PORTSDIR=	/usr/ports
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410011502.s91F2bOk036281>