diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-01 17:43:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-01 17:43:19 +0000 |
commit | 3fc070c42b6158f085de20f843697d689a32842b (patch) | |
tree | cdf4f6a3cb027b52994c11bed59fd41e98bee71d | |
parent | e2e7a6c666eb615770d59b1b7db900f9bd159a67 (diff) | |
download | urpmi-3fc070c42b6158f085de20f843697d689a32842b.tar urpmi-3fc070c42b6158f085de20f843697d689a32842b.tar.gz urpmi-3fc070c42b6158f085de20f843697d689a32842b.tar.bz2 urpmi-3fc070c42b6158f085de20f843697d689a32842b.tar.xz urpmi-3fc070c42b6158f085de20f843697d689a32842b.zip |
Patch by Shlomi Fish to fix error recovery on download of description files.
-rw-r--r-- | urpm.pm | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1438,10 +1438,16 @@ this could happen if you mounted manually the directory when creating the medium media => $medium->{name}, }; eval { $urpm->{sync}($syncopts, reduce_pathname("$medium->{url}/media_info/descriptions")) }; - -e "$urpm->{cachedir}/partial/descriptions" or eval { - #- try older location - $urpm->{sync}($syncopts, reduce_pathname("$medium->{url}/../descriptions")); - }; + #- It is possible that the original fetch of the descriptions + #- failed, but the file still remains in partial/ because it was + #- moved from $urpm->{statedir} earlier. So we need to check if + #- the previous download failed. + if ($@ || (! -e "$urpm->{cachedir}/partial/descriptions")) { + eval { + #- try older location + $urpm->{sync}($syncopts, reduce_pathname("$medium->{url}/../descriptions")); + }; + } if (-e "$urpm->{cachedir}/partial/descriptions") { urpm::util::move("$urpm->{cachedir}/partial/descriptions", "$urpm->{statedir}/descriptions.$medium->{name}"); } |