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
|
<?php
start_internal_task('Create portage target environment');
$C=$W.'/config_root';
makedirs($I, $C, "$W/log", "$W/tmp");
log_status("Making symlink $C/etc -> .", symlink('.', "$C/etc"));
$makeconf=array(
'pkgdir' => $S['conf']['pkgdir_root'].'/'.$profile->pkgdir,
'chost' => $headers['chost'],
'accept_keywords' => $headers['accept_keywords'],
'root' => $I,
'port_logdir' => "$W/log",
'emerge_log_dir' => "$W/log",
'portage_tmpdir' => "$W/tmp"
);
$contents='';
foreach ($makeconf as $name => $val)
$contents.=strtoupper($name).'='.escapeshellarg($val)."\n";
unset($makeconf);
log_status('Writing '.$C.'/make.conf', file_put_contents($C.'/etc/make.conf', $contents));
unset($contents);
log_status('Making make.profile symlink to '.$S['conf']['portdir'].'/profiles/'.$headers['profile'], symlink($S['conf']['portdir'].'/profiles/'.$headers['profile'], $C.'/etc/make.profile'));
global $prtg_cfgrt;
$prtg_cfgrt=array('PORTAGE_CONFIGROOT' => $C);
end_internal_task(0);
?>
|