diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 13:56:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 13:56:14 +0000 |
commit | 9ac5875a7aea70e80c2815fa910884a7aad62fb2 (patch) | |
tree | fe34251b811c56b14ac551c0edf0d05cbea7115a /urpm/media.pm | |
parent | cf2bccec451dc425d6d8d4f35651d64e219ed494 (diff) | |
download | urpmi-9ac5875a7aea70e80c2815fa910884a7aad62fb2.tar urpmi-9ac5875a7aea70e80c2815fa910884a7aad62fb2.tar.gz urpmi-9ac5875a7aea70e80c2815fa910884a7aad62fb2.tar.bz2 urpmi-9ac5875a7aea70e80c2815fa910884a7aad62fb2.tar.xz urpmi-9ac5875a7aea70e80c2815fa910884a7aad62fb2.zip |
- urpmi.update
o only copy previous hdlist in cache dir for rsync, don't do it for wget/curl
(it's useless and potentially dangerous when used with "resume")
Diffstat (limited to 'urpm/media.pm')
-rw-r--r-- | urpm/media.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index bdabc44d..ee8e790d 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1487,10 +1487,9 @@ sub _update_medium__parse_if_unmodified__remote { if ($options->{force}) { unlink cachedir_with_hdlist($urpm, $medium, 's'); } else { - #- try to sync (copy if needed) local copy after restored the previous one. - #- this is useful for rsync (?) + #- for rsync, try to sync (copy if needed) local copy after restored the previous one. my $previous_hdlist = statedir_hdlist_or_synthesis($urpm, $medium, 's'); - if (-e $previous_hdlist) { + if (-e $previous_hdlist && urpm::protocol_from_url($medium->{url}) eq 'rsync') { copy_and_own( $previous_hdlist, cachedir_with_hdlist($urpm, $medium, 's'), |