summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-27 13:44:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-27 13:44:26 +0000
commit1a8e216b62644a003e0ee4530841a0147d5f4edb (patch)
tree1a213f49492079664d866f83cc7f8860f72928bf /urpm/media.pm
parentf969d3d1e11f5fed1acc8e5e35b14dea60b06a0e (diff)
downloadurpmi-1a8e216b62644a003e0ee4530841a0147d5f4edb.tar
urpmi-1a8e216b62644a003e0ee4530841a0147d5f4edb.tar.gz
urpmi-1a8e216b62644a003e0ee4530841a0147d5f4edb.tar.bz2
urpmi-1a8e216b62644a003e0ee4530841a0147d5f4edb.tar.xz
urpmi-1a8e216b62644a003e0ee4530841a0147d5f4edb.zip
create is_local_medium() and is_local_url()
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 0ee2eba9..15ccc45c 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -2,7 +2,7 @@ package urpm::media;
# $Id$
-use urpm 'file_from_local_url';
+use urpm 'file_from_local_url', 'is_local_medium';
use urpm::msg;
use urpm::util;
use urpm::removable;
@@ -953,7 +953,7 @@ sub may_reconfig_urpmi {
if (-s $f) {
reconfig_urpmi($urpm, $f, $medium);
}
- unlink $f if !file_from_local_url($medium->{url});
+ unlink $f if !is_local_medium($medium);
}
#- read a reconfiguration file for urpmi, and reconfigure media accordingly
@@ -1459,7 +1459,7 @@ sub _update_medium_ {
{
my $rc =
- file_from_local_url($medium->{url})
+ is_local_medium($medium)
? _update_medium__parse_if_unmodified__local($urpm, $medium, \%options)
: _update_medium__parse_if_unmodified__remote($urpm, $medium, \%options);
@@ -1610,7 +1610,7 @@ sub _retrieve_media_info_file_and_check_MD5SUM {
my $name = "$prefix$suffix";
my $cachedir_file =
- file_from_local_url($medium->{url}) ?
+ is_local_medium($medium) ?
_copy_media_info_file($urpm, $medium, $prefix, $suffix) :
_download_media_info_file($urpm, $medium, $prefix, $suffix, $quiet) or
$urpm->{error}(N("retrieval of [%s] failed", _synthesis_dir($medium) . "/$name")), return;