Allow dots in variant names

Closes: https://trac.macports.org/ticket/46807
This commit is contained in:
Rainer Müller
2018-03-12 13:10:51 +01:00
parent bc58fe89e4
commit c3f0873107
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -437,8 +437,8 @@ proc portlint::lint_main {args} {
set name_ok true
set desc_ok true
if {![regexp {^[A-Za-z0-9_]+$} $variantname]} {
ui_error "Variant name $variantname is not valid; use \[A-Za-z0-9_\]+ only"
if {![regexp {^[A-Za-z0-9_.]+$} $variantname]} {
ui_error "Variant name $variantname is not valid; use \[A-Za-z0-9_.\]+ only"
incr errors
set name_ok false
}
+2 -2
View File
@@ -590,7 +590,7 @@ proc variant {args} {
}
ditem_key $ditem name "[join [ditem_key $ditem provides] -]"
if {![regexp {^[A-Za-z0-9_]+$} [ditem_key $ditem provides]]} {
if {![regexp {^[A-Za-z0-9_.]+$} [ditem_key $ditem provides]]} {
set name [ditem_key $ditem provides]
ditem_delete $ditem
return -code error "Variant name $name contains invalid characters"
@@ -2223,7 +2223,7 @@ proc handle_default_variants {option action {value ""}} {
}
array set vinfo $PortInfo(vinfo)
foreach v $value {
if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant]} {
if {[regexp {([-+])([-A-Za-z0-9_.]+)} $v whole val variant]} {
# Retrieve the information associated with this variant.
if {![info exists vinfo($variant)]} {
set vinfo($variant) {}