blob: 3b31cfc8c51be0d8607cd11e72ac90ac05690cfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?
// $verbose = true;
// $qa = true;
require_once 'header.php';
$sql = "DROP TABLE IF EXISTS tmp_ebuild_use;";
$db->query($sql);
$sql = "CREATE TEMP TABLE tmp_ebuild_use AS SELECT eu.id AS ebuild, REGEXP_SPLIT_TO_TABLE(metadata, E'\\\\s+') AS name FROM missing_use eu;";
$db->query($sql);
$sql = "UPDATE tmp_ebuild_use SET name = SUBSTR(name, 2) WHERE SUBSTR(name, 1, 1) = '+' OR SUBSTR(name, 1, 1) = '-';";
$db->query($sql);
$sql = "INSERT INTO ebuild_use SELECT DISTINCT eu.ebuild, u.id FROM tmp_ebuild_use eu INNER JOIN use u ON u.name = eu.name;";
$db->query($sql);
?>
|