You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Allow dots in variant names
Closes: https://trac.macports.org/ticket/46807
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user