summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-08 18:51:03 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-08 18:51:03 +0000
commite156b1ce366fb2c05298731a3ba4ceb905e88738 (patch)
tree27605629ea67de4bd93b676f7a247ab72c9aa9f4 /urpm/media.pm
parentb7e56b30b8c4801b1d4d4a47c71d92de0e7bc438 (diff)
downloadurpmi-e156b1ce366fb2c05298731a3ba4ceb905e88738.tar
urpmi-e156b1ce366fb2c05298731a3ba4ceb905e88738.tar.gz
urpmi-e156b1ce366fb2c05298731a3ba4ceb905e88738.tar.bz2
urpmi-e156b1ce366fb2c05298731a3ba4ceb905e88738.tar.xz
urpmi-e156b1ce366fb2c05298731a3ba4ceb905e88738.zip
use newly introduced any()
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm6
1 files changed, 3 insertions, 3 deletions
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);
}
}