blob: 631cf0fe4492f8818b2a50feb50c522d385319d7 (
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
|
<?php
require_once(dirname(__FILE__).'/packages.php'); // __DIR__ 5.3.0
// This is the main function that carries out a build from start to finish
function gentoo_portage_build(&$build, &$opts, &$W) {
global $S;
$profile=new sql_gentoo_profile($opts['profile']);
$headers=$profile->get_headers();
$I="$W/image";
require(dirname(__FILE__).'/setup.php'); // __DIR__ in 5.3.0
if ($S['conf']['debug'])
execute_command_with_env('Log portage setup', 'emerge --info', $prtg_cfgrt);
require(dirname(__FILE__).'/base-system.php'); // __DIR__ 5.3.0
$extra=explode(' ', $opts['options']);
if (in_array('portage', $extra))
require(dirname(__FILE__).'/portage.php'); // __DIR__ 5.3.0
if (in_array('pruneinit', $extra))
require(dirname(__FILE__).'/init.d.php'); // __DIR__ 5.3.0
if (in_array('timezone', $extra))
require(dirname(__FILE__).'/timezone.php'); // __DIR__ 5.3.0
if (in_array('hostname', $extra))
require(dirname(__FILE__).'/hostname.php'); // __DIR__ 5.3.0
if (in_array('dev-manager', $extra))
require(dirname(__FILE__).'/dev-manager.php'); // __DIR__ 5.3.0
if ($opts['bundler'] == 'livecd')
emerge('app-misc/livecd-tools', 'Install LiveCD utilities');
if (strlen($opts['pkgsets'])) {
foreach (explode(' ', $opts['pkgsets']) as $pkgset) {
if (strlen($opts['pkgset-'.$pkgset])) {
emerge($opts['pkgset-'.$pkgset]);
}
}
}
if (strlen($opts['install_packages']))
emerge($opts['install_packages'], 'Install selected packages');
return $I;
}
?>
|