blob: efa09a9286f5c7f595e1ba5931acc118a2a6a600 (
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
|
<?
require_once 'header.php';
if(!$tree) {
require_once 'class.portage.tree.php';
$tree = new PortageTree();
}
// FIXME This is really dumb, just grab all the arches
// since I look at all of them now.
$arr_arches = $tree->getArches();
$arr_arches = array_merge($arr_arches, $tree->getArches(true));
$arr = importDiff('arch', $arr_arches);
if(count($arr['delete'])) {
foreach($arr['delete'] as $name) {
$sql = "DELETE FROM arch WHERE name = ".$db->quote($name).";";
shell::msg($sql);
$db->query($sql);
}
}
if(count($arr['insert'])) {
foreach($arr['insert'] as $name) {
$arr_insert = array('name' => $name);
$db->autoExecute('arch', $arr_insert, MDB2_AUTOQUERY_INSERT);
}
}
unset($arr);
?>
|