diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-17 09:06:38 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-17 09:06:38 +0000 |
commit | 89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2 (patch) | |
tree | 0e4d13feaad6f2999d38c2e762863771b4c8bc14 | |
parent | 2cdbfcaf36c3561381a440ca84f2579ce0092776 (diff) | |
download | urpmi-89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2.tar urpmi-89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2.tar.gz urpmi-89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2.tar.bz2 urpmi-89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2.tar.xz urpmi-89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2.zip |
3.7-6mdk
-rw-r--r-- | urpm.pm | 16 | ||||
-rw-r--r-- | urpmi.spec | 5 |
2 files changed, 16 insertions, 5 deletions
@@ -541,8 +541,15 @@ sub configure { } } foreach (grep { !$_->{ignore} && (!$options{update} || $_->{update}) } @{$urpm->{media} || []}) { - $urpm->{log}(_("examining synthesis file [%s]", "$urpm->{statedir}/synthesis.$_->{hdlist}")); - ($_->{start}, $_->{end}) = $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$_->{hdlist}"); + delete @{$_}{qw(start end)}; + if (-s "$urpm->{statedir}/synthesis.$_->{hdlist}" > 32) { + $urpm->{log}(_("examining synthesis file [%s]", "$urpm->{statedir}/synthesis.$_->{hdlist}")); + eval { ($_->{start}, $_->{end}) = $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$_->{hdlist}") }; + } + unless (defined $_->{start} && defined $_->{end}) { + $urpm->{error}(_("problem reading synthesis file of medium \"%s\"", $_->{name})); + $_->{ignore} = 1; + } } } @@ -985,7 +992,8 @@ sub update_media { unlink "$urpm->{cachedir}/partial/$basename"; #- as previously done, just read synthesis file here, this is enough. $urpm->{log}(_("examining synthesis file [%s]", "$urpm->{statedir}/synthesis.$medium->{hdlist}")); - ($medium->{start}, $medium->{end}) = $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$medium->{hdlist}"); + eval { ($medium->{start}, $medium->{end}) = + $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$medium->{hdlist}") }; unless (defined $medium->{start} && defined $medium->{end}) { $urpm->{error}(_("problem reading synthesis file of medium \"%s\"", $medium->{name})); $medium->{ignore} = 1; @@ -1109,7 +1117,7 @@ sub update_media { unlink "$urpm->{cachedir}/partial/$medium->{list}"; #- read default synthesis (we have to make sure nothing get out of depslist). $urpm->{log}(_("examining synthesis file [%s]", "$urpm->{statedir}/synthesis.$medium->{hdlist}")); - ($medium->{start}, $medium->{end}) = $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$medium->{hdlist}"); + eval { ($medium->{start}, $medium->{end}) = $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$medium->{hdlist}") }; unless (defined $medium->{start} && defined $medium->{end}) { $urpm->{error}(_("problem reading synthesis file of medium \"%s\"", $medium->{name})); $medium->{ignore} = 1; @@ -2,7 +2,7 @@ Name: urpmi Version: 3.7 -Release: 5mdk +Release: 6mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -144,6 +144,9 @@ fi %changelog +* Wed Jul 17 2002 François Pons <fpons@mandrakesoft.com> 3.7-6mdk +- fixed uncatched die, now produce error message. + * Tue Jul 16 2002 François Pons <fpons@mandrakesoft.com> 3.7-5mdk - fixed no progression of download. - fixed bad proxy support on command line. |