Commit cf04b0d7 authored by Leigh B Stoller's avatar Leigh B Stoller

Minor changes to allow versioned (:N) parentos os names.

parent 93bd39be
......@@ -13,7 +13,8 @@ sub InstallUpdate($$)
Phase "JSON", "Checking for port p5-JSON", sub {
DoneIfPackageInstalled("p5-JSON");
ExecQuietFatal("cd $PORTSDIR/converters/p5-JSON; ".
"make MASTER_SITE_FREEBSD=1 -DBATCH install");
"make MASTER_SITE_FREEBSD=1 ".
" DISABLE_VULNERABILITIES=1 -DBATCH install");
};
}
return 0;
......
......@@ -906,7 +906,7 @@ REPLACE INTO table_regex VALUES ('virt_nodes','routertype','text','regex','^(non
REPLACE INTO table_regex VALUES ('virt_nodes','fixed','text','redirect','default:tinytext',0,128,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','sharing_mode','text','regex','^[-\\w]+$',1,32,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','osname','text','regex','^((([-\\w]+\\/{0,1})[-\\w\\.+]+(:\\d+){0,1})|((http|https|ftp)\\:\\/\\/[-\\w\\.\\/\\@\\:\\~\\?\\=\\&]*))$',2,128,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','parent_osname','text','regex','^([-\\w]+\\/{0,1})[-\\w\\.+]+$',2,128,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','parent_osname','text','redirect','virt_nodes:osname',2,128,NULL);
REPLACE INTO table_regex VALUES ('virt_programs','pid','text','redirect','projects:pid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_programs','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_programs','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
......
......@@ -296,10 +296,20 @@ Node instproc updatedb {DB} {
#
# If the osid won't run on the specified parent, die.
#
if {$parent_osid != "" && $osid != ""
&& [lsearch -exact $subosids($osid) $parent_osid] == -1} {
perror "subOSID $osid does not run on parent OSID $parent_osid!"
return
if {$parent_osid != "" && $osid != ""} {
# Look for :version in the names.
set os $osid
if { [regexp {:} $osid] } {
set os [lindex [split $osid {:}] 0]
}
set pos $parent_osid
if { [regexp {:} $parent_osid] } {
set pos [lindex [split $parent_osid {:}] 0]
}
if {[lsearch -exact $subosids($os) $pos] == -1} {
perror "subOSID $osid does not run on parent OSID $parent_osid!"
return
}
}
#
......
......@@ -663,7 +663,12 @@ proc tb-set-node-os {node os {parentos 0}} {
return
}
if {$parentos != {} && $parentos != 0} {
if {! [info exists osids($parentos)]} {
# Look for :version in the name.
set posid $parentos
if { [regexp {:} $parentos] } {
set posid [lindex [split $os {:}] 0]
}
if {! [info exists osids($posid)]} {
perror "\[tb-set-node-os] Invalid parent osid $parentos."
return
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment