From 0904c05e45d5eba7b833f6db16ac5d7e7af3f92b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 20 Nov 2006 13:30:32 +0000 Subject: really don't go the force_building_hdlist way if there is an invalid hdlist/synthesis --- urpm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 2f6379cc..b12346f4 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1383,6 +1383,7 @@ sub _update_medium__parse_if_unmodified__or_get_files__local { ) or $urpm->{error}(N("unable to access medium \"%s\", this could happen if you mounted manually the directory when creating the medium.", $medium->{name})), return 'unmodified'; + my $error; #- try to probe for possible with_hdlist parameter, unless #- it is already defined (and valid). if ($options->{probe_with} && (!$medium->{with_hdlist} || ! -e "$dir/$medium->{with_hdlist}")) { @@ -1390,9 +1391,11 @@ this could happen if you mounted manually the directory when creating the medium -e "$dir/$_" or next; if (file_size("$dir/$_") > 32) { $medium->{with_hdlist} = $_; + undef $error; #- allowing a valid hdlist to save from an invalid hdlist last; } else { $urpm->{error}(N("invalid hdlist file %s for medium \"%s\"", "$dir/$_", $medium->{name})); + $error = 1; } } #- redo... @@ -1415,7 +1418,7 @@ this could happen if you mounted manually the directory when creating the medium #- to be checked for being valid, nothing can be deduced if no MD5SUM #- file is present. - my ($retrieved_md5sum, $error); + my ($retrieved_md5sum); unless ($medium->{virtual}) { if ($medium->{with_hdlist}) { -- cgit v1.2.1