diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 14:29:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 14:29:16 +0000 |
commit | e70af9c6aff2c57bd822415a1e3fd2b8cb994567 (patch) | |
tree | b7bda12519a8683575b15549e8dbc51e8955c1ba /urpm | |
parent | 8fe06c99a46de3284e2aba96a5c9016b49ac8cb2 (diff) | |
download | urpmi-e70af9c6aff2c57bd822415a1e3fd2b8cb994567.tar urpmi-e70af9c6aff2c57bd822415a1e3fd2b8cb994567.tar.gz urpmi-e70af9c6aff2c57bd822415a1e3fd2b8cb994567.tar.bz2 urpmi-e70af9c6aff2c57bd822415a1e3fd2b8cb994567.tar.xz urpmi-e70af9c6aff2c57bd822415a1e3fd2b8cb994567.zip |
when doing urpmi.addmedia on a remote medium, we first look for
synthesis.hdlist.cz, but we should also download MD5SUM and check
synthesis.hdlist.cz (the checking was only done on urpmi.update)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/media.pm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index bdb43e33..5a807226 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1171,6 +1171,7 @@ sub _update_medium__parse_if_unmodified__remote { unlink cachedir_with_synthesis($urpm, $medium); $options->{callback} and $options->{callback}('failed', $medium->{name}); }; + my $ok = 1; if (!_synthesis_dir($medium)) { my $err; _probe_with_try_list($urpm, $medium, sub { @@ -1190,6 +1191,9 @@ sub _update_medium__parse_if_unmodified__remote { $urpm->{error}(N("...retrieving failed: %s", $err)); return; }; + + $options->{nomd5sum} || _download_MD5SUM($urpm, $medium); + } else { if ($options->{force}) { unlink cachedir_with_synthesis($urpm, $medium); @@ -1203,15 +1207,16 @@ sub _update_medium__parse_if_unmodified__remote { ) or $error->(N("...copying failed")), return; } } - my $ok = get_synthesis__remote($urpm, $medium, $options->{callback}, $options->{quiet}); - $ok &&= !$options->{force} || check_synthesis_md5sum($urpm, $medium); + $ok = get_synthesis__remote($urpm, $medium, $options->{callback}, $options->{quiet}); + } - $options->{callback} and $options->{callback}('done', $medium->{name}); + $ok &&= !$options->{force} || check_synthesis_md5sum($urpm, $medium); - if (!$ok) { - _ignore_medium_on_parse_error($urpm, $medium); - return; - } + $options->{callback} and $options->{callback}('done', $medium->{name}); + + if (!$ok) { + _ignore_medium_on_parse_error($urpm, $medium); + return; } 1; } |