blob: a9ac27bc905fe4b9d00cdd09d51c090fd10e24e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
$package=preg_replace('/[^[:alnum:]_.+-]/', '', $_GET['package']);
if (!$package) {
die("Invalid package");
}
$db = new SQLite3('autobuild.db');
$package_id = $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'");
if (!$package_id) {
die("Invalid package");
}
echo "<h1>History of package \"$package\"</h1>\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 "<a href='results.php?run=$run' >$run</a> ";
$base_dir = "cauldron/x86_64/core/$run";
if ($link = glob("$base_dir/$package-*.src.rpm/")) {
echo "<a href='$link[0]'>$build_result</a><br/>\n";
} else {
echo "$build_result<br/>\n";
}
}
?>
|