summaryrefslogtreecommitdiff
blob: 29f56d6dbe528103ed6bc7543247eb53f33d213e (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 '.$S['conf']['pkgdir_root'].'/'.$dir.'...';
	$profiles[]=new sql_gentoo_profile();
	$profile=&$profiles[count($profiles)-1];
	$profile->pkgdir=$dir;
	echo "done\n";
	echo 'Loading data from '.$S['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";
}
?>