summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-24 20:43:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-24 20:43:35 +0000
commit1b32b6ce93722e82caf1fbb5e8f2fd085126ac26 (patch)
treeb76d1316d0f1b8364b4af401f80a20e9609a8f05 /urpm/media.pm
parent846a00f14e4897180a1e6b9923d7799f2e59dc7d (diff)
downloadurpmi-1b32b6ce93722e82caf1fbb5e8f2fd085126ac26.tar
urpmi-1b32b6ce93722e82caf1fbb5e8f2fd085126ac26.tar.gz
urpmi-1b32b6ce93722e82caf1fbb5e8f2fd085126ac26.tar.bz2
urpmi-1b32b6ce93722e82caf1fbb5e8f2fd085126ac26.tar.xz
urpmi-1b32b6ce93722e82caf1fbb5e8f2fd085126ac26.zip
remove defensive programming checks, which are already done in
check_existing_medium() or add_medium()
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm23
1 files changed, 6 insertions, 17 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index d65a7351..44212c6a 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -925,12 +925,7 @@ sub _parse_hdlist_or_synthesis__when_not_modified {
delete @$medium{qw(start end)};
if ($medium->{virtual}) {
- if (file_from_file_url($medium->{url})) {
- _parse_maybe_hdlist_or_synthesis($urpm, $medium, hdlist_or_synthesis_for_virtual_medium($medium));
- } else {
- $urpm->{error}(N("virtual medium \"%s\" is not local, medium ignored", $medium->{name}));
- $medium->{ignore} = 1;
- }
+ _parse_maybe_hdlist_or_synthesis($urpm, $medium, hdlist_or_synthesis_for_virtual_medium($medium));
} else {
if (!_parse_synthesis($urpm, $medium, statedir_synthesis($urpm, $medium))) {
_parse_hdlist($urpm, $medium, statedir_hdlist($urpm, $medium));
@@ -944,17 +939,11 @@ sub _parse_hdlist_or_synthesis__when_not_modified {
sub _parse_hdlist_or_synthesis__virtual {
my ($urpm, $medium) = @_;
- if (my $hdlist_or = hdlist_or_synthesis_for_virtual_medium($medium)) {
- delete $medium->{modified};
- $medium->{really_modified} = 1;
- $urpm->{md5sum_modified} = 1;
- _parse_maybe_hdlist_or_synthesis($urpm, $medium, $hdlist_or);
- _check_after_reading_hdlist_or_synthesis($urpm, $medium);
- } else {
- $urpm->{error}(N("virtual medium \"%s\" should have valid source hdlist or synthesis, medium ignored",
- $medium->{name}));
- $medium->{ignore} = 1;
- }
+ delete $medium->{modified};
+ $medium->{really_modified} = 1;
+ $urpm->{md5sum_modified} = 1;
+ _parse_maybe_hdlist_or_synthesis($urpm, $medium, hdlist_or_synthesis_for_virtual_medium($medium));
+ _check_after_reading_hdlist_or_synthesis($urpm, $medium);
}
#- names.<media_name> is used by external progs (namely for bash-completion)