summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-07-03 13:49:27 +0000
committerFrancois Pons <fpons@mandriva.com>2001-07-03 13:49:27 +0000
commit4f7862bb0b44201619adfc76ee3763dd81b020d3 (patch)
tree307f0e1fb9f2248365339f04d411cf6549dae450
parent4d201ab36035d419f54dc5621d3ebd8f5867f020 (diff)
downloaddrakx-backup-do-not-use-4f7862bb0b44201619adfc76ee3763dd81b020d3.tar
drakx-backup-do-not-use-4f7862bb0b44201619adfc76ee3763dd81b020d3.tar.gz
drakx-backup-do-not-use-4f7862bb0b44201619adfc76ee3763dd81b020d3.tar.bz2
drakx-backup-do-not-use-4f7862bb0b44201619adfc76ee3763dd81b020d3.tar.xz
drakx-backup-do-not-use-4f7862bb0b44201619adfc76ee3763dd81b020d3.zip
added loadSavePackagesOnFloppy to manage package selection file used by
auto_install too from packages tree directly on floppies.
-rw-r--r--perl-install/install_steps_interactive.pm33
1 files changed, 32 insertions, 1 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 4fda58db6..88f48cab5 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -527,7 +527,38 @@ sub choosePackagesTree {
sort => 1,
});
}
-
+sub loadSavePackagesOnFloppy {
+ my ($o, $packages) = @_;
+ my $choice = $o->ask_from_listf('',
+_("Please choose load or save package selection on floppy.
+The format is the same as auto_install generated floppies."),
+ sub { translate($_[0]{text}) },
+ [ { text => _("Load from floppy"), code => sub {
+ while (1) {
+ my $w = $o->wait_message(_("Package selection"), _("Loading from floppy"));
+ log::l("load package selection from floppy");
+ my $O = eval { install_any::loadO({}, 'floppy') };
+ if ($@) {
+ $w = undef; #- close wait message.
+ $o->ask_okcancel('', _("Insert a floppy containing package selection"))
+ or return;
+ } else {
+ install_any::unselectMostPackages($o);
+ foreach (@{$O->{default_packages} || []}) {
+ my $pkg = pkgs::packageByName($packages, $_);
+ pkgs::selectPackage($packages, $pkg) if $pkg;
+ }
+ return 1;
+ }
+ }
+ } },
+ { text => _("Save on floppy"), code => sub {
+ log::l("save package selection to floppy");
+ install_any::g_default_packages($o, 'quiet');
+ } },
+ ]);
+ $choice->{code} and $choice->{code}();
+}
sub chooseGroups {
my ($o, $packages, $compssUsers, $min_level, $individual, $max_size) = @_;