aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2004-12-30 07:14:27 +0000
committerKris Kennaway <kris@FreeBSD.org>2004-12-30 07:14:27 +0000
commitd9f3d6b0d09f36b6bb2f5dc84c46e429ceb783a1 (patch)
tree0455d4f11039af90ae327813594ded2e3b4adb1b
parent9badc0b8067de94f18187b125601b9bf1856c894 (diff)
downloadports-d9f3d6b0d09f36b6bb2f5dc84c46e429ceb783a1.tar.gz
ports-d9f3d6b0d09f36b6bb2f5dc84c46e429ceb783a1.zip
* Back out introduction of DATE variable in previous commit; it conflicts
with the reasonable use of that variable to hold date strings in the environment [1] * Overhaul the mtree spec file selection code: instead of deciding based on the value of USE_X_PREFIX, compare PREFIX to X11BASE and LOCALBASE directly. This fixes the MTREE_FILE for ports that set PREFIX=${X11BASE} but don't set USE_X_PREFIX for some reason. If PREFIX is a nonstandard value, set NO_MTREE=yes. Noticed by: Jez Hancock <jez.hancock@gmail.com> [1]
Notes
Notes: svn path=/head/; revision=125503
-rw-r--r--Mk/bsd.port.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index f5e84dfd6aa7..f6396ed5caba 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -908,7 +908,6 @@ COMM?= /usr/bin/comm
CP?= /bin/cp
CPIO?= /usr/bin/cpio
CUT?= /usr/bin/cut
-DATE?= /bin/date
DC?= /usr/bin/dc
DIALOG?= /usr/bin/dialog
DIRNAME?= /usr/bin/dirname
@@ -1885,17 +1884,19 @@ EXTRACT_CMD?= ${GZIP_CMD}
# Figure out where the local mtree file is
.if !defined(MTREE_FILE) && !defined(NO_MTREE)
-.if defined(USE_X_PREFIX)
+.if ${PREFIX} == ${X11BASE}
.if ${X_WINDOW_SYSTEM:L} == xfree86-3
MTREE_FILE= /etc/mtree/BSD.x11.dist
.else
MTREE_FILE= /etc/mtree/BSD.x11-4.dist
.endif
.else
-.if ${PREFIX} == /usr
+.if ${PREFIX} == ${LOCALBASE}
+MTREE_FILE= /etc/mtree/BSD.local.dist
+.elif ${PREFIX} == /usr
MTREE_FILE= /etc/mtree/BSD.usr.dist
.else
-MTREE_FILE= /etc/mtree/BSD.local.dist
+NO_MTREE= yes # Can't figure out prefix, assume nonstandard
.endif
.endif
.endif
@@ -2943,7 +2944,7 @@ check-vulnerable:
@if [ -f "${AUDITFILE}" ]; then \
audit_created=`${_EXTRACT_AUDITFILE} | \
${SED} -nEe "1s/^#CREATED: *([0-9]{4})-?([0-9]{2})-?([0-9]{2}).*$$/\1\2\3/p"`; \
- audit_expiry=`${DATE} -u -v-14d "+%Y%m%d"`; \
+ audit_expiry=`/bin/date -u -v-14d "+%Y%m%d"`; \
if [ "$$audit_created" -lt "$$audit_expiry" ]; then \
${ECHO_MSG} "===> WARNING: Vulnerability database out of date, checking anyway"; \
fi; \