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 /urpm.pm | |
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
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 16 |
1 files changed, 12 insertions, 4 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; |