summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-24 20:52:09 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-24 20:52:09 +0000
commit7eceb08a15719ec5f858c17c3b2faed687aabc42 (patch)
tree008bb55cb2cd0dbfbd907c56813cb7a5d831dc00 /perl-install/install
parentf687228b6c0125b92fd51d33a284d74ca9a4b292 (diff)
downloaddrakx-7eceb08a15719ec5f858c17c3b2faed687aabc42.tar
drakx-7eceb08a15719ec5f858c17c3b2faed687aabc42.tar.gz
drakx-7eceb08a15719ec5f858c17c3b2faed687aabc42.tar.bz2
drakx-7eceb08a15719ec5f858c17c3b2faed687aabc42.tar.xz
drakx-7eceb08a15719ec5f858c17c3b2faed687aabc42.zip
(default_packages) log packages selected b/c of HW, fs, install method, ...
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/any.pm40
2 files changed, 26 insertions, 15 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 8e15b1f56..54bf86d2e 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- log packages selected b/c of HW, fs, install method, ...
- summary:
o list shorewall with iptables* in services
- diskdrake:
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 5521bd4db..85ee15ee8 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -538,21 +538,30 @@ sub default_packages {
my ($o) = @_;
my @l;
- push @l, "brltty" if cat_("/proc/cmdline") =~ /brltty=/;
- push @l, "nfs-utils-clients" if $o->{method} eq "nfs";
- push @l, "mdadm" if !is_empty_array_ref($o->{all_hds}{raids});
- push @l, "lvm2" if !is_empty_array_ref($o->{all_hds}{lvms});
- push @l, "cryptsetup" if !is_empty_array_ref($o->{all_hds}{dmcrypts});
- push @l, "dmraid" if any { fs::type::is_dmraid($_) } @{$o->{all_hds}{hds}};
- push @l, "microcode_ctl" if detect_devices::hasCPUMicrocode();
- push @l, 'cpufreq' if detect_devices::hasCPUFreq();
- push @l, 'apmd' if -e "/proc/apm";
- push @l, detect_devices::probe_name('Pkg');
- push @l, map { $_->{BOOTPROTO} eq 'dhcp' ? $_->{DHCP_CLIENT} || 'dhcp-client' : () } values %{$o->{net}{ifcfg}};
+ sub add_n_log {
+ my ($reason, @packages) = @_;
+ if (@packages) {
+ log::l("selecting " . join(',', @packages) . " because of $reason");
+ push @l, @packages;
+ }
+ }
+
+ add_n_log("/proc/cmdline=~/brltty=/", "brltty") if cat_("/proc/cmdline") =~ /brltty=/;
+ add_n_log("method==nfs", "nfs-utils-clients") if $o->{method} eq "nfs";
+ add_n_log("have RAID", "mdadm") if !is_empty_array_ref($o->{all_hds}{raids});
+ add_n_log("have LVM", "lvm2") if !is_empty_array_ref($o->{all_hds}{lvms});
+ add_n_log("have crypted DM", "cryptsetup") if !is_empty_array_ref($o->{all_hds}{dmcrypts});
+ add_n_log("some disks are fake RAID", "dmraid") if any { fs::type::is_dmraid($_) } @{$o->{all_hds}{hds}};
+ add_n_log("CPU needs microcode", "microcode_ctl") if detect_devices::hasCPUMicrocode();
+ add_n_log("CPU needs cpufreq", 'cpufreq') if detect_devices::hasCPUFreq();
+ add_n_log("APM support needed", 'apmd') if -e "/proc/apm";
+ add_n_log("needed by hardware", detect_devices::probe_name('Pkg'));
+ my @ltmp = map { $_->{BOOTPROTO} eq 'dhcp' ? $_->{DHCP_CLIENT} || 'dhcp-client' : () } values %{$o->{net}{ifcfg}};
+ add_n_log("needed by networking", @ltmp) if @ltmp;
# will get auto selected at summary stage for bootloader:
push @l, qw(acpi acpid mageia-gfxboot-theme);
# only needed for CDs/DVDs installations:
- push @l, 'perl-Hal-Cdroms' if $o->{method} eq 'cdrom';
+ add_n_log("method='cdrom'", 'perl-Hal-Cdroms') if $o->{method} eq 'cdrom';
my $dmi_BIOS = detect_devices::dmidecode_category('BIOS');
my $dmi_Base_Board = detect_devices::dmidecode_category('Base Board');
@@ -562,9 +571,10 @@ sub default_packages {
modules::append_to_modules_loaded_at_startup_for_all_kernels('acerhk');
}
- push @l, 'quota' if any { $_->{options} =~ /usrquota|grpquota/ } @{$o->{fstab}};
- push @l, uniq(grep { $_ } map { fs::format::package_needed_for_partition_type($_) } @{$o->{fstab}});
- push @l, 'ntfs-3g' if any { $_->{fs_type} eq 'ntfs-3g' } @{$o->{fstab}};
+ add_n_log("some fs is mounted with quota options", 'quota') if any { $_->{options} =~ /usrquota|grpquota/ } @{$o->{fstab}};
+ @ltmp = uniq(grep { $_ } map { fs::format::package_needed_for_partition_type($_) } @{$o->{fstab}});
+ add_n_log("needed by some fs", @ltmp) if @ltmp;
+ add_n_log("some fs is NTFS-3G", 'ntfs-3g') if any { $_->{fs_type} eq 'ntfs-3g' } @{$o->{fstab}};
# handle locales with specified scripting:
my @languages = map { s/\@.*//; $_ } lang::langsLANGUAGE($o->{locale}{langs});