summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-28 17:41:08 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-28 17:41:08 -0400
commit42bda2c6130984f9350b099c9ef808ab4155e5bf (patch)
tree98665d92edd85e47588d51765906fa711283104f /frontend
parentMade package selector, pkglist more efficient by filtering out package metada... (diff)
downloadingenue-42bda2c6130984f9350b099c9ef808ab4155e5bf.tar.gz
ingenue-42bda2c6130984f9350b099c9ef808ab4155e5bf.tar.bz2
ingenue-42bda2c6130984f9350b099c9ef808ab4155e5bf.zip
Add package and init script pruning to frontend
Diffstat (limited to 'frontend')
-rw-r--r--frontend/modules/gentoo/step2.php5
-rw-r--r--frontend/modules/gentoo/step3.php19
2 files changed, 22 insertions, 2 deletions
diff --git a/frontend/modules/gentoo/step2.php b/frontend/modules/gentoo/step2.php
index 2c9f769..8eed939 100644
--- a/frontend/modules/gentoo/step2.php
+++ b/frontend/modules/gentoo/step2.php
@@ -1,7 +1,8 @@
<?php
-$this->checkbox_array('options', 'options', 'Configuration options', array('timezone' => 'Select timezone', 'dev-manager' => 'Select /dev manager'));
-$profile=new sql_gentoo_profile($this->get_opt('profile'));
global $S;
+$profile=new sql_gentoo_profile($this->get_opt('profile'));
+$this->checkbox_array('options', 'options', 'Configuration options', array('timezone' => 'Select timezone', 'dev-manager' => 'Select /dev manager', 'pruneinit' => 'Remove enabled-by-default init scripts'));
+$this->select('basesystem', 'basesystem', 'Base system', array('stage3' => 'Stage3 Tarball', 'autoprune' => 'Remove all non-vital packages', 'manual' => 'Manually select packages to remove from stage3'));
$pkgsets=array();
$r=$S['pdo']->query('SELECT * FROM `gentoo_pkgsets` WHERE `profile`='.$profile->id);
while ($pkgset=$r->fetch(PDO::FETCH_ASSOC)) {
diff --git a/frontend/modules/gentoo/step3.php b/frontend/modules/gentoo/step3.php
index a4f1b30..dd2d72c 100644
--- a/frontend/modules/gentoo/step3.php
+++ b/frontend/modules/gentoo/step3.php
@@ -1,4 +1,5 @@
<?php
+global $S;
$opts=explode(' ', $this->get_opt('options'));
if (in_array('timezone', $opts))
$this->select('timezone', 'timezone', 'Timezone', get_timezones());
@@ -18,6 +19,24 @@ if (strlen($pkgsets=$this->get_opt('pkgsets'))) {
$this->checkbox_array('pkgset-'.$pkgset->id, 'pkgset-'.$pkgset->id, $pkgset->name, $pkgs);
}
}
+if (in_array('pruneinit', $opts)) {
+ $r=$S['pdo']->query('SELECT * FROM `gentoo_baseinit` WHERE `profile`='.$profile->id.' ORDER BY `name`, `runlevel`');
+ $scripts=array();
+ while ($script=$r->fetch(PDO::FETCH_ASSOC)) {
+ $script=new sql_gentoo_baseinit($script);
+ $scripts["$script->name:$script->runlevel"]="$script->name ($script->runlevel)";
+ }
+ $this->checkbox_array('pruneinit', 'pruneinit', 'Remove the following init scripts', $scripts);
+}
+if ($this->get_opt('basesystem') == 'manual') {
+ $r=$S['pdo']->query('SELECT * FROM `gentoo_basepkgs` WHERE `profile`='.$profile->id.' ORDER BY `pkg`');
+ $pkgs=array();
+ while ($pkg=$r->fetch(PDO::FETCH_ASSOC)) {
+ $pkg=$pkg['pkg'];
+ $pkgs[$pkg]=$pkg;
+ }
+ $this->checkbox_array('prunepkgs', 'prunepkgs', 'Remove the following packages from the base system', $pkgs);
+}
// TODO This shouldn't be a step at all, it should be in wizard.php to choose between bundlers
// TODO This shouldn't be part of configurations, except possibly a default value. It should be for builds
$this->select('bundler', 'bundler', 'Image type', array(