From 935fff1506bda8ffb065c5d6b2ba32e008611404 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Nov 2006 17:58:45 +0000 Subject: is_iso() now returns a boolean value --- urpm.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index d0fa601a..b0f2c2ac 100644 --- a/urpm.pm +++ b/urpm.pm @@ -346,7 +346,7 @@ sub probe_medium { #- returns the removable device name if it corresponds to an iso image, '' otherwise sub is_iso { my ($removable_dev) = @_; - $removable_dev && $removable_dev =~ /\.iso$/i ? $removable_dev : ''; + $removable_dev && $removable_dev =~ /\.iso$/i; } #- probe device associated with a removable device. @@ -1211,7 +1211,7 @@ sub update_media { $options{force} < 2 && ($options{probe_with} || $medium->{with_hdlist}) ? $with_hdlist_dir : $dir, #- in case of an iso image, pass its name - is_iso($medium->{removable}), + 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})), next; @@ -2727,7 +2727,7 @@ sub copy_packages_of_removable_media { #- 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. - while ($check_notfound->($id, $dir, is_iso($medium->{removable}) || 'removable')) { + while ($check_notfound->($id, $dir, is_iso($medium->{removable}) ? $medium->{removable} : 'removable')) { is_iso($medium->{removable}) || $options{ask_for_medium} or $urpm->{fatal}(4, N("medium \"%s\" is not selected", $medium->{name})); $urpm->try_umounting($dir); -- cgit v1.2.1