diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-06 10:41:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-06 10:41:52 +0000 |
commit | d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a (patch) | |
tree | 0a6647c845e3927f0f80c80477e62ec07883619c | |
parent | 697cc7d4aeb9c0959eb2f833bd4efe309268fdd6 (diff) | |
download | urpmi-d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a.tar urpmi-d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a.tar.gz urpmi-d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a.tar.bz2 urpmi-d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a.tar.xz urpmi-d2e2b70e9e6fe92e4ea3d8cee938413ec237c32a.zip |
nicer error message
-rw-r--r-- | urpm/media.pm | 2 | ||||
-rw-r--r-- | urpm/removable.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index 79cda2d8..01d1c737 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -756,7 +756,7 @@ sub add_distrib_media { if ($url && urpm::is_local_url($url)) { $url = _migrate_removable_url($url) or return(); my $m = { url => $url }; - urpm::removable::try_mounting_medium($urpm, $m) or return (); + urpm::removable::try_mounting_medium_($urpm, $m) or $urpm->{error}(N("directory %s does not exist", $url)); $distribconf = MDV::Distribconf->new(file_from_file_url($url) || $url, undef); $distribconf->settree('mandriva'); diff --git a/urpm/removable.pm b/urpm/removable.pm index ecc774e5..e1c69469 100644 --- a/urpm/removable.pm +++ b/urpm/removable.pm @@ -18,11 +18,11 @@ sub file_or_synthesis_dir { } #- side-effects: -#- + those of _try_mounting_medium ($medium->{mntpoint}) +#- + those of try_mounting_medium_ ($medium->{mntpoint}) sub try_mounting_medium { my ($urpm, $medium, $o_url) = @_; - my $rc = _try_mounting_medium($urpm, $medium, $o_url); + my $rc = try_mounting_medium_($urpm, $medium, $o_url); $rc or $urpm->{error}(N("unable to access medium \"%s\".", $medium->{name})); $rc; } @@ -30,7 +30,7 @@ sub try_mounting_medium { #- side-effects: #- + those of urpm::cdrom::try_mounting_cdrom ($urpm->{cdrom_mounted}, $medium->{mntpoint}, "hal_mount") #- + those of _try_mounting_local ($urpm->{removable_mounted}, "mount") -sub _try_mounting_medium { +sub try_mounting_medium_ { my ($urpm, $medium, $o_url) = @_; if (urpm::is_cdrom_url($medium->{url})) { |