From 5223f58a4891cb4b842355aa2cdaaed78d901b3c Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Tue, 13 Aug 2019 14:46:28 +0000 Subject: Mk/bsd.sanity.mk: Flag non-integer PORTREVISION/PORTEPOCH Currently they are not checked and something like PORTREVISION=foo or just PORTREVISION= is accepted. Some ports use indirection via custom variables for them so it is worthwhile to check that they are set to sane values. While here fix ports that currently have non-integer PORTREVISION or PORTEPOCH. Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D21225 --- Mk/bsd.sanity.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Mk') diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk index 2aa0f21fe4c8..04542537d798 100644 --- a/Mk/bsd.sanity.mk +++ b/Mk/bsd.sanity.mk @@ -168,6 +168,14 @@ DEV_ERROR+= "PORT${_type} does not do anything unless the ${_type} option is pre . endif .endfor +.if empty(PORTEPOCH) || !empty(PORTEPOCH:C/[0-9]+//) +DEV_ERROR+= "PORTEPOCH needs to be an integer \>= 0" +.endif + +.if empty(PORTREVISION) || !empty(PORTREVISION:C/[0-9]+//) +DEV_ERROR+= "PORTREVISION needs to be an integer \>= 0" +.endif + # Whitelist of options helper lookalikes that should not be reported on: _OPTIONS_HELPERS_SEEN+= OPENSSL_LDFLAGS _BROKEN_OPTIONS_HELPERS= -- cgit v1.2.3