From c2f200920f04dba0874c054038770a91a71fbba5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Jan 2003 13:22:28 +0000 Subject: use "if any" instead of "if grep", and various other occurences of "any", "every", "partition" --- perl-install/install_steps.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/install_steps.pm') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 75e20fe77..8d61c58c2 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -186,7 +186,7 @@ sub doPartitionDisksAfter { } cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/image nfs| && - !grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{all_hds}{nfss}} and + !any { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{all_hds}{nfss}} and push @{$o->{all_hds}{nfss}}, { type => 'nfs', mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,soft,rsize=8192,wsize=8192" }; } @@ -383,7 +383,7 @@ sub afterInstallPackages($) { die N("Some important packages didn't get installed properly. Either your cdrom drive or your cdrom is defective. Check the cdrom on an installed computer using \"rpm -qpl Mandrake/RPMS/*.rpm\" -") if grep { m|read failed: Input/output error| } cat_("$o->{prefix}/root/drakx/install.log"); +") if any { m|read failed: Input/output error| } cat_("$o->{prefix}/root/drakx/install.log"); if (arch() !~ /^sparc/) { #- TODO restore it as may be needed for sparc -x "$o->{prefix}/usr/bin/dumpkeys" or $::testing or die @@ -848,7 +848,7 @@ sub setupBootloaderBefore { ); #- propose the default fb mode for kernel fb, if aurora or bootsplash is installed. - my $need_fb = grep { + my $need_fb = any { my $p = pkgs::packageByName($o->{packages}, $_); $p && $p->flag_installed; } 'Aurora', 'bootsplash'; -- cgit v1.2.1