summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-20 13:30:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-20 13:30:32 +0000
commit0904c05e45d5eba7b833f6db16ac5d7e7af3f92b (patch)
treee87f713b0263482fcbce7d358ea42a9a5aaf690e /urpm.pm
parentf3756181934d4b1f2b02c8ed3dff019ea0319c69 (diff)
downloadurpmi-0904c05e45d5eba7b833f6db16ac5d7e7af3f92b.tar
urpmi-0904c05e45d5eba7b833f6db16ac5d7e7af3f92b.tar.gz
urpmi-0904c05e45d5eba7b833f6db16ac5d7e7af3f92b.tar.bz2
urpmi-0904c05e45d5eba7b833f6db16ac5d7e7af3f92b.tar.xz
urpmi-0904c05e45d5eba7b833f6db16ac5d7e7af3f92b.zip
really don't go the force_building_hdlist way if there is an invalid hdlist/synthesis
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
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}) {