blob: e192d0c09110aa50c6f1639d33018ae9479b68fa (
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
|
<?
require_once 'header.php';
require_once 'class.portage.tree.php';
require_once 'class.portage.use_flag.php';
require_once 'class.portage.ebuild.php';
require_once 'class.portage.atom.php';
require_once '/home/steve/svn/znurt/class.db.mtime.php';
require_once '/home/steve/svn/znurt/class.db.use.php';
require_once 'File/Find.php';
$tree = new PortageTree();
// Global use flags
$type = 'global';
$u = new PortageUseFlag($type);
$filemtime = filemtime($u->filename);
$arr_use_flags[$type] = $u->getUseFlags();
$keys = array_keys($arr_use_flags[$type]);
$where = "prefix = ''";
$dbmtime = new DBMtime($u->filename);
$sql = "SELECT COUNT(1) FROM use WHERE $where;";
$db_count = $db->getOne($sql);
$arr_new[$type] = $arr_delete[$type] = array();
if(is_null($dbmtime->mtime)) {
$dbmtime->mtime = $dbmtime->filemtime;
} elseif($filemtime > $dbmtime->mtime) {
$dbmtime->mtime = $filemtime;
}
foreach($arr_use_flags[$type] as $name => $arr) {
$dbuse = new DBUse($name, $type);
if($dbuse->description != $arr['description'])
$dbuse->description = $arr['description'];
}
?>
|