summaryrefslogtreecommitdiff
path: root/buildmaster/blacklist.php
blob: b76ec883f845081ec641df71442dbcfe0eaf45a5 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
require_once "../init.php";

require_once BASE . "/lib/mysql.php";

  $result = mysql_run_query(
    'SELECT DISTINCT' .
    ' GROUP_CONCAT(`q`.`arch`) AS `archs`,' .
    '`q`.`pkgbases`,' .
    '`q`.`reason`' .
    ' FROM (' .
      'SELECT DISTINCT' .
      ' `q`.`arch`,' .
      'GROUP_CONCAT(`q`.`pkgbase`) AS `pkgbases`,' .
      '`q`.`reason`' .
      ' FROM (' .
        'SELECT DISTINCT' .
        ' `architectures`.`name` AS `arch`,' .
        '`package_sources`.`pkgbase`,' .
        '`build_assignments`.`is_black_listed` AS `reason`' .
        ' FROM `build_assignments`' .
        mysql_join_build_assignments_architectures() .
        mysql_join_build_assignments_package_sources() .
        'WHERE `build_assignments`.`is_black_listed` IS NOT NULL' .
        ' ORDER BY `package_sources`.`pkgbase`' .
      ') AS `q`' .
      ' GROUP BY CONCAT(to_base64(`q`.`arch`)," - ",to_base64(`q`.`reason`))' .
      ' ORDER BY `q`.`arch`' .
    ') AS `q`' .
    ' GROUP BY CONCAT(to_base64(`q`.`pkgbases`)," - ",to_base64(`q`.`reason`))'
  );

?>
<html>
  <head>
    <title>Blacklisted packages</title>
    <link rel="stylesheet" type="text/css" href="/static/style.css">
  </head>
  <body>
<?php show_warning_on_offline_slave(); ?>
    <table>
      <tr>
        <th>architectures</th>
        <th>package</th>
        <th>reason</th>
      </tr>
<?php

if ($result -> num_rows > 0) {
  while($row = $result->fetch_assoc()) {
    print "      <tr>\n";
    print "        <td>";
    print $row['archs'];
    print "</td>\n";
    print "        <td>";
    print $row['pkgbases'];
    print "</td>\n";
    print "        <td>";
    print preg_replace(
      array (
        "/FS32#(\\d+)/",
        "/FS#(\\d+)/"
      ),
      array (
        "<a href=\"https://bugs.archlinux32.org/index.php?do=details&task_id=$1\">$0</a>",
        "<a href=\"https://bugs.archlinux.org/task/$1\">$0</a>"
      ),
      $row['reason']
    );
    print "</td>\n";
    print "      </tr>\n";
  }
}
?>
    </table>
  </body>
</html>