Commit 74fd53da authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fix up generic OSIDs that still use nextosid but are not using the

def_parentosid/os_submap setup we use now.
parent 7eb99473
use strict;
use libdb;
use OSinfo;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
# Fix up special OSids
my $query_result =
DBQueryFatal("select osid,nextosid from os_info_versions ".
"where nextosid is not null and def_parentosid is null");
while (my ($osid,$nextosid) = $query_result->fetchrow_array()) {
next
if ($nextosid == 0);
my $osinfo = OSinfo->Lookup($osid);
my $nextosinfo = OSinfo->Lookup($nextosid);
if (!defined($nextosinfo)) {
print STDERR "Could not lookup nextosid $nextosid for $osid\n";
next;
}
$osinfo->SetParentOS($nextosinfo);
$osinfo->SetRunsOnParent($nextosinfo);
}
return 0;
}
# Local Variables:
# mode:perl
# End:
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