From 1150427a31dea3ccccfd9918f6fe8215a0a8dec9 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Thu, 12 May 2022 13:58:39 -0500 Subject: [PATCH] portlint.tcl: Error if version contains + character See: https://trac.macports.org/ticket/65073 --- src/port1.0/portlint.tcl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/port1.0/portlint.tcl b/src/port1.0/portlint.tcl index 468cef3d82..285d617fdd 100644 --- a/src/port1.0/portlint.tcl +++ b/src/port1.0/portlint.tcl @@ -1,6 +1,6 @@ # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # -# Copyright (c) 2007 - 2018, 2020 The MacPorts Project +# Copyright (c) 2007 - 2018, 2020, 2022 The MacPorts Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -555,6 +555,13 @@ proc portlint::lint_main {args} { } } + if {[info exists version]} { + if {[string first + $version] != -1} { + ui_error "Port version '$version' is invalid. The '+' character is reserved for enabling variants." + incr errors + } + } + if {[info exists platforms]} { foreach platform $platforms { if {$platform ni $lint_platforms} {