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

Minor fix to repo based profiles; I was failing to update the repohash

when the repo changed, but not the profile source (some other file changed).
parent 6bb6995a
......@@ -654,6 +654,9 @@ sub UpdateMetaData($$)
$mods{$key} = $argref->{$key};
}
}
return 0
if (!keys(%mods));
my $query = "update apt_profiles set ".
join(",", map("$_=" . DBQuoteSpecial($mods{$_}), keys(%mods)));
......
......@@ -1412,6 +1412,11 @@ function Do_UpdateRepository()
return;
}
}
elseif ($profile->script() == $blob["source"]) {
if (UpdateMaster($profile, null, null)) {
return;
}
}
SPITAJAX_RESPONSE($blob);
}
......@@ -1441,9 +1446,11 @@ function UpdateMaster($profile, $script, $rspec)
fwrite($fp, " <value>" .
htmlspecialchars($profile->name()) . "</value>");
fwrite($fp, "</attribute>\n");
fwrite($fp, "<attribute name='rspec'>");
fwrite($fp, " <value>" . htmlspecialchars($rspec) . "</value>");
fwrite($fp, "</attribute>\n");
if ($rspec) {
fwrite($fp, "<attribute name='rspec'>");
fwrite($fp, " <value>" . htmlspecialchars($rspec) . "</value>");
fwrite($fp, "</attribute>\n");
}
if ($script) {
fwrite($fp, "<attribute name='script'>");
fwrite($fp, " <value>" . htmlspecialchars($script) . "</value>");
......
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