summaryrefslogtreecommitdiff
blob: 657aa919c691884749561d6a703c4c3047db7ae2 (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
<?php
$profiles=array();
foreach (get_pkgdirs() as $dir) {
	echo 'Creating profile for '.$conf['pkgdir_root'].'/'.$dir.'...';
	$profiles[]=new sql_gentoo_profile();
	$profile=&$profiles[count($profiles)-1];
	$profile->pkgdir=$dir;
	echo "done\n";
	echo 'Loading data from '.$conf['pkgdir_root'].'/'.$dir.'/Packages...';
	$profile->read_Packages();
	$profile->read_pkgsets();
	echo "done\n";
}
foreach (explode("\n", trim(file_get_contents(CACHE.'/stage3/map'))) as $line) {
	list($profile, $file)=explode(' ', $line);
	if (!is_numeric($profile)) continue;
	$profile=new sql_gentoo_profile($profile);
	$profile->stage3=$file;
	$profile->write();
	echo "Loading $profile->pkgdir stage3 data from $file...";
	$profile->read_stage3();
	echo "done\n";
}
?>