summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/cfg.pm2
-rw-r--r--urpm/media.pm6
-rw-r--r--urpm/signature.pm2
3 files changed, 5 insertions, 5 deletions
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index 5e002b0d..2bd90633 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -136,7 +136,7 @@ sub load_config_raw {
} elsif (/^(.*?[^\\])\s+(?:(.*?[^\\])\s+)?{$/) {
#- medium definition
my ($name, $url) = (unquotespace($1), unquotespace($2));
- if (grep { $_->{name} eq $name } @blocks) {
+ if (any { $_->{name} eq $name } @blocks) {
#- hmm, somebody fudged urpmi.cfg by hand.
$err = N("medium `%s' is defined twice, aborting", $name);
return;
diff --git a/urpm/media.pm b/urpm/media.pm
index ee5adf27..fc3d77c6 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1141,18 +1141,18 @@ sub _cleanup_mediacfg_dir {
$medium->{mediacfg}[0]{root} or next;
my $dir = reduce_pathname(dirname($medium->{mediacfg}[0]{root}));
begins_with($medium->{mediacfg}[0]{root}, $dir) or next;
- if (!grep { $_->{mediacfg}[0]{root} == $medium->{mediacfg}[0]{root} } @{$urpm->{media}}) {
+ if (!any { $_->{mediacfg}[0]{root} == $medium->{mediacfg}[0]{root} } @{$urpm->{media}}) {
$urpm->{debug} and $urpm->{debug}("removing no longer used $dir");
-d $dir and urpm::sys::clean_dir($dir);
next;
}
if ($medium->{mirrorlist}) {
- if (!grep { $_->{mirrorlist} eq $medium->{mirrorlist} } @{$urpm->{media}}) {
+ if (!any { $_->{mirrorlist} eq $medium->{mirrorlist} } @{$urpm->{media}}) {
_remove_medium_from_mediacfg($urpm, $dir, $medium->{mirrorlist}, 1);
}
} elsif ($medium->{url}) {
- if (!grep { $_->{url} eq $medium->{url} } @{$urpm->{media}}) {
+ if (!any { $_->{url} eq $medium->{url} } @{$urpm->{media}}) {
_remove_medium_from_mediacfg($urpm, $dir, $medium->{url}, 0);
}
}
diff --git a/urpm/signature.pm b/urpm/signature.pm
index 6272dfac..235867bf 100644
--- a/urpm/signature.pm
+++ b/urpm/signature.pm
@@ -53,7 +53,7 @@ sub _check {
my $invalid_ids = 0;
foreach my $key_id ($verif =~ /(?:key id \w{8}|#)(\w+)/gi) {
- if (grep { hex($_) == hex($key_id) } split /[,\s]+/, $key_ids) {
+ if (any { hex($_) == hex($key_id) } split /[,\s]+/, $key_ids) {
++$valid_ids;
} else {
++$invalid_ids;