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()) {
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";
return 0;
# Local Variables:
# mode:perl
# End:
Supports Markdown
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