From 89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 17 Jul 2002 09:06:38 +0000 Subject: 3.7-6mdk --- urpm.pm | 16 ++++++++++++---- urpmi.spec | 5 ++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/urpm.pm b/urpm.pm index 81175235..f8473bd0 100644 --- a/urpm.pm +++ b/urpm.pm @@ -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; diff --git a/urpmi.spec b/urpmi.spec index 6b3a7c82..fd0da750 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -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 3.7-6mdk +- fixed uncatched die, now produce error message. + * Tue Jul 16 2002 François Pons 3.7-5mdk - fixed no progression of download. - fixed bad proxy support on command line. -- cgit v1.2.1