aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Urpmi.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-04-17 20:50:17 +0000
committerThierry Vignaud <tv@mageia.org>2012-04-17 20:50:17 +0000
commit66ab797e670d51917a4e1d7f1712d4ec9da11df2 (patch)
treecbd800d28b97b04f7042592cec161b3cca1335f4 /lib/Iurt/Urpmi.pm
parente551cc2e53a861826589fec414c79c232c9a934e (diff)
downloadiurt-66ab797e670d51917a4e1d7f1712d4ec9da11df2.tar
iurt-66ab797e670d51917a4e1d7f1712d4ec9da11df2.tar.gz
iurt-66ab797e670d51917a4e1d7f1712d4ec9da11df2.tar.bz2
iurt-66ab797e670d51917a4e1d7f1712d4ec9da11df2.tar.xz
iurt-66ab797e670d51917a4e1d7f1712d4ec9da11df2.zip
(clean_chroot,new,urpmi_command) simplify using urpm::is_local_url()
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r--lib/Iurt/Urpmi.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index df4a5bd..9e20a97 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -9,7 +9,7 @@ use Iurt::Chroot qw(add_local_user create_temp_chroot);
use Iurt::Process qw(perform_command clean_process sudo);
use Iurt::Config qw(dump_cache_par get_maint get_package_prefix);
use Iurt::Util qw(plog);
-
+use urpm;
sub new {
my ($class, %opt) = @_;
@@ -30,7 +30,7 @@ sub new {
plog('DEBUG', "installation media: $run->{chrooted_media}");
}
- $self->{use__urpmi_root} = $config->{repository} =~ m/^(ftp|https?|rsync):/;
+ $self->{use__urpmi_root} = urpm::is_local_url($config->{repository});
$self->{distrib_url} = "$config->{repository}/$run->{distro}/$run->{my_arch}";
$self;
@@ -120,7 +120,7 @@ sub urpmi_command {
$name =~ s![/:]!_!g;
my $url;
- if ($run->{additional_media}{repository} =~ m!^(ftp|https?|rsync):!) {
+ if (urpm::is_local_url($run->{additional_media}{repository})) {
$url = $run->{additional_media}{repository};
}
else {