Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
850a6db0
Commit
850a6db0
authored
Jun 05, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix for package/type names that have a dash in them, we were
regenerating the object more then once.
parent
08976c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
tbsetup/libossetup.pm.in
tbsetup/libossetup.pm.in
+6
-7
No files found.
tbsetup/libossetup.pm.in
View file @
850a6db0
...
...
@@ -980,6 +980,7 @@ sub NewType($$)
# Note that type might be a class, and so Lookup() returns nothing.
#
my $typeinfo = NodeType->Lookup($type);
my $packname = "libossetup_${type}";
# Switches are special.
if (defined($typeinfo) && $typeinfo->isswitch()) {
...
...
@@ -988,22 +989,20 @@ sub NewType($$)
print STDERR "$self libossetup_switch load failed: " . $@;
return undef;
}
# Dashes in type names are bad in this code.
$type =~ s/\-/\_/g;
}
elsif ($type eq "pcfedphys" || $type eq "pcfed") {
$type = "protogeni";
$packname = "libossetup_${type}";
# Dashes in package names are bad.
$packname =~ s/\-/\_/g;
}
elsif (defined($typeinfo) && $typeinfo->issubnode()) {
$type = "subnode";
$packname = "libossetup_subnode";
}
my $packname = "libossetup_${type}";
my $newtype = eval { $packname->New($self); };
# Not loaded?
if ($@) {
#print STDERR "module load failed: " . $@ . "\n";
eval "require
libossetup_${type}
";
eval "require
$packname
";
if ($@) {
if ($@ !~ /Can'
t
locate
libossetup_
/)
{
print
STDERR
"$self NewType($type): module load failed: "
.
$@;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment