summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm16
-rw-r--r--urpmi.spec5
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 <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.