summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-01 17:46:53 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-01 17:46:53 -0400
commite77f28c56eef5feae20bfc7716e6c11b2195ada0 (patch)
treeb675457e790b107f776e6e26e0255811d24facf7 /shared
parentMany fixes to CD building and some to command execution/logging (diff)
downloadingenue-e77f28c56eef5feae20bfc7716e6c11b2195ada0.tar.gz
ingenue-e77f28c56eef5feae20bfc7716e6c11b2195ada0.tar.bz2
ingenue-e77f28c56eef5feae20bfc7716e6c11b2195ada0.zip
Update both parts for proper modularity, start catalyst-based backend, code cleanup, especially on backend
Diffstat (limited to 'shared')
-rw-r--r--shared/classes/task.php32
-rw-r--r--shared/config.php4
2 files changed, 4 insertions, 32 deletions
diff --git a/shared/classes/task.php b/shared/classes/task.php
index 796864f..569d0fb 100644
--- a/shared/classes/task.php
+++ b/shared/classes/task.php
@@ -76,7 +76,7 @@ class sql_task extends sql_row_obj {
$html.='</div></div>';
return $html;
}
- function execute($fatal=true, $path=null, $env=null) {
+ function execute($path=null, $env=null) {
if (!isset($this->command, $this->build, $this->order)) {
throw_exception('$this->command, $this->build, or $this->order not set');
} elseif (isset($this->start)) {
@@ -142,37 +142,7 @@ class sql_task extends sql_row_obj {
$this->exit=proc_close($p);
}
$this->write();
- if ($this->exit == 0)
- log_msg(color('[success]', 'green'));
- elseif ($this->exit > 0) {
- log_msg(color('[exit code '.$this->exit.']', 'red'));
- if ($fatal)
- throw_exception($this->command.' returned with exit status '.$this->exit);
- } elseif ($this->exit == -128) {
- log_msg(color('[received unknown signal]', 'red'));
- if ($fatal)
- throw_exception($this->command.' received an unknown signal');
- } else {
- log_msg(color('[received signal '.-$this->exit.']', 'red'));
- if ($fatal)
- throw_exception($this->command.' received signal '.-$this->exit);
- }
return $this->exit;
}
- static function execute_command($description, $command, $build, $fatal=true, $path=null, $env=null) {
- global $task;
- // TODO this won't work once we have internal tasks too - we need to modify the build class to track its own task IDs
- static $buildid=null;
- static $order=0;
- if ($build->id !== $buildid) {
- $buildid=$build->id;
- $order=0;
- }
- $task=new sql_task($build->id, $order, null, $description, $command);
- $result=$task->execute($fatal, $path, $env);
- $order++;
- unset($task);
- return $result;
- }
}
?>
diff --git a/shared/config.php b/shared/config.php
index 53ab10a..c8f1179 100644
--- a/shared/config.php
+++ b/shared/config.php
@@ -6,6 +6,8 @@ $conf['sqlpass']='socpassword'; // MySQL password
$conf['sqldb']='soc'; // MySQL database
$conf['debug']=true; // Whether to print debugging information
$conf['cache']=true; // Whether to enable built-in caching
+$conf['backend_modules']='gentoo_portage gentoo_catalyst'; // Space-separated list of backend modules to offer the user
+$conf['frontend_modules']='gentoo'; // Space-separated list of frontend modules to offer the user
$conf['cookiename']='ingenueid'; // Name of the cookie to send for keeping sessions
$conf['sessionlength']=1814400; // Time in seconds before sessions are purged
$conf['timezone']=10800; // Time difference in seconds between UTC and the default timezone
@@ -16,7 +18,7 @@ $conf['pkgdir_root']='/home/eitan/soc/tinderbox'; // The directory to recursivel
$conf['emerge_default_opts']='-t -v -K --color=y --root-deps=rdeps'; // DON'T CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING
$conf['portdir']='/usr/portage'; // The directory conatining the portage tree to use (/usr/portage unless you have a reason to think otherwise)
$conf['logview_max']=1000; // The maximum number of log entries shown on one page (1000 is a good start)
-$conf['split_setip']=true; // Whether the frontend and backend are running on different hosts
+$conf['split_setup']=true; // Whether the frontend and backend are running on different hosts
$conf['frontend_location']='http://soc'; // The base address of the frontend installation (for use by the backend)
$conf['backend_name']='red'; // A name or other way of identifying this backend as opposed to other backends working for the same frontend TODO use gethostname() by default in 5.3.0
?>