querySingle("SELECT Id FROM Packages WHERE Name = '$package'");
if (!$package_id) {
die("Invalid package");
}
echo "
History of package \"$package\"
\n";
$result = $db->query("SELECT date(datetime(Start, 'unixepoch')) as run, ResultValues.Name FROM Runs, Results, ResultValues WHERE Runs.Id = Results.Run AND Results.Result = ResultValues.Id AND Results.Package = '$package_id' ORDER BY Start DESC");
while ($entry = $result->fetchArray(SQLITE3_ASSOC)) {
$run = $entry['run'];
$build_result = $entry['Name'];
echo "$run ";
if ($link = glob("cauldron/*/core/$run/$package-*.src.rpm/")) {
echo "$build_result
\n";
} else {
echo "$build_result
\n";
}
}
?>