summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-20 14:19:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-20 14:19:09 +0000
commitca59555e1697ecd3aa7e11ee3d182b24ff1c23c6 (patch)
treedd850cb438e5e144c651ff022d916fc4b2a762f2
parent5600492dcd56bbf8c43bc7c2696e935d3791b111 (diff)
downloadurpmi-ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6.tar
urpmi-ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6.tar.gz
urpmi-ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6.tar.bz2
urpmi-ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6.tar.xz
urpmi-ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6.zip
replace "or" with "if (!..."
-rw-r--r--urpm.pm20
1 files changed, 11 insertions, 9 deletions
diff --git a/urpm.pm b/urpm.pm
index b12346f4..021a5744 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1372,16 +1372,18 @@ sub _update_medium__parse_if_unmodified__or_get_files__local {
#- this is used to probe for a possible hdlist file.
my $with_hdlist_dir = reduce_pathname($dir . ($medium->{with_hdlist} ? "/$medium->{with_hdlist}" : "/.."));
- #- the directory given does not exist and may be accessible
- #- by mounting some other directory. Try to figure it out and mount
- #- everything that might be necessary.
- -d $dir or $urpm->try_mounting(
- !$options->{force_building_hdlist} && ($options->{probe_with} || $medium->{with_hdlist})
- ? $with_hdlist_dir : $dir,
- #- in case of an iso image, pass its name
- is_iso($medium->{removable}) && $medium->{removable},
- ) or $urpm->{error}(N("unable to access medium \"%s\",
+ if (!-d $dir) {
+ #- the directory given does not exist and may be accessible
+ #- by mounting some other directory. Try to figure it out and mount
+ #- everything that might be necessary.
+ $urpm->try_mounting(
+ !$options->{force_building_hdlist} && ($options->{probe_with} || $medium->{with_hdlist})
+ ? $with_hdlist_dir : $dir,
+ #- in case of an iso image, pass its name
+ is_iso($medium->{removable}) && $medium->{removable},
+ ) 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