diff options
author | Francois Pons <fpons@mandriva.com> | 2001-10-08 17:33:47 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-10-08 17:33:47 +0000 |
commit | 9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782 (patch) | |
tree | 8680caa6b87c045e6ddbad5425b631f39e0b587b /urpm.pm | |
parent | 4fe91335bb07dcff1ecf8174cfd0170dfd632739 (diff) | |
download | urpmi-9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782.tar urpmi-9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782.tar.gz urpmi-9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782.tar.bz2 urpmi-9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782.tar.xz urpmi-9b5fc928dd9eb0cf76beae1d9ba2ceae5129f782.zip |
make strong check of rpm file on a removable device for accepting a medium.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1594,7 +1594,19 @@ sub upload_source_packages { my $medium = $urpm->{media}[$id]; $media{$id} = undef; if (my ($prefix, $dir) = $medium->{url} =~ /^(removable_[^:]*|file):\/(.*)/) { - until (-e $dir) { + my $count_not_found = sub { + my $not_found; + if (-e $dir) { + foreach (@{$list->[$id]}) { + /^(removable_[^:]*|file):\/(.*\/([^\/]*))/ or next; + -r $2 or ++$not_found; + } + } else { + $not_found = @{$list->[$id]}; + } + return $not_found; + }; + while ($count_not_found->()) { #- the directory given does not exist or may be accessible #- by mounting some other. try to figure out these directory and #- mount everything necessary. |