summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-11-21 23:23:31 +0000
committerThierry Vignaud <tv@mageia.org>2012-11-21 23:23:31 +0000
commitcc6cf3352215ba8287ff915fae554843c9de815b (patch)
tree867bb94256552ce0e416108eb9f0197f3cfe9217 /urpm/select.pm
parent689b9c5d05c3b29c9f6983a21ed55f512ba11b4d (diff)
downloadurpmi-cc6cf3352215ba8287ff915fae554843c9de815b.tar
urpmi-cc6cf3352215ba8287ff915fae554843c9de815b.tar.gz
urpmi-cc6cf3352215ba8287ff915fae554843c9de815b.tar.bz2
urpmi-cc6cf3352215ba8287ff915fae554843c9de815b.tar.xz
urpmi-cc6cf3352215ba8287ff915fae554843c9de815b.zip
use "any" instead of "grep" in scalar context
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 7bd4cc2b..416c2fd7 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -403,9 +403,9 @@ sub _resolve_priority_upgrades {
my %priority_requested = map { $_->id => undef } @$priority_pkgs;
$urpm->resolve_requested($db, \%priority_state, \%priority_requested, %options);
- if (grep { ! exists $priority_state{selected}{$_} } keys %priority_requested) {
+ if (any { ! exists $priority_state{selected}{$_} } keys %priority_requested) {
#- some packages which were selected previously have not been selected, strange!
- } elsif (grep { ! exists $priority_state{selected}{$_} } keys %$selected) {
+ } elsif (any { ! exists $priority_state{selected}{$_} } keys %$selected) {
#- there are other packages to install after this priority transaction.
%$state = %priority_state;
$need_restart = 1;
@@ -572,7 +572,7 @@ sub _prohibit_packages_that_would_be_removed {
});
grep {
- ! grep { $base{$_} } rejected_unsatisfied($state, $_);
+ ! any { $base{$_} } rejected_unsatisfied($state, $_);
} intersection(\@to_remove, \@base_fn);
}