From 66ab797e670d51917a4e1d7f1712d4ec9da11df2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 17 Apr 2012 20:50:17 +0000 Subject: (clean_chroot,new,urpmi_command) simplify using urpm::is_local_url() --- lib/Iurt/Chroot.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Iurt/Chroot.pm') diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index f0d1e4b..1ed50f6 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -9,6 +9,7 @@ use Iurt::Config qw(dump_cache_par); use Iurt::Util qw(plog); use File::Temp 'mktemp'; use File::Path 'mkpath'; +use urpm; our @EXPORT = qw( clean_chroot_tmp @@ -92,7 +93,7 @@ sub clean_chroot { if ($run->{additional_media} && $run->{additional_media}{repository}) { my $rep = $run->{additional_media}{repository}; - if ($rep !~ m/^(ftp|https?|rsync):)/) { + if (urpm::is_local_url($rep)) { my $mount_point = "$chroot/urpmi_medias"; my $url = $rep; $url =~ s!^file://!!; -- cgit v1.2.1