From 14c865d29f0f482700e535641d50152eecc316d2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 25 Sep 2008 07:46:58 +0000 Subject: create selected_leaves_pl() out of g_default_packages() --- perl-install/install/any.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 95bbb4488..416e24bdb 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -752,14 +752,19 @@ sub g_default_packages { my ($o) = @_; my ($_h, $file) = media_browser($o, 'save', 'package_list.pl') or return; + output($file, selected_leaves_pl($o)); +} + +sub selected_leaves_pl { + my ($o) = @_; require Data::Dumper; my $str = Data::Dumper->Dump([ { default_packages => install::pkgs::selected_leaves($o->{packages}) } ], ['$o']); $str =~ s/ {8}/\t/g; - output($file, - "# You should always check the syntax with 'perl -cw auto_inst.cfg.pl'\n" . - "# before testing. To use it, boot with ``linux defcfg=floppy''\n" . - $str); + + "# You should always check the syntax with 'perl -cw auto_inst.cfg.pl'\n" . + "# before testing. To use it, boot with ``linux defcfg=floppy''\n" . + $str; } sub loadO { -- cgit v1.2.1