aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-04-17 20:50:20 +0000
committerThierry Vignaud <tv@mageia.org>2012-04-17 20:50:20 +0000
commit34fed4809b00a0b63a5a3a3cb761f8b003d65d29 (patch)
treed12b158f03c1b6a8f04cd549320d9a3c32e38730
parent66ab797e670d51917a4e1d7f1712d4ec9da11df2 (diff)
downloadiurt-34fed4809b00a0b63a5a3a3cb761f8b003d65d29.tar
iurt-34fed4809b00a0b63a5a3a3cb761f8b003d65d29.tar.gz
iurt-34fed4809b00a0b63a5a3a3cb761f8b003d65d29.tar.bz2
iurt-34fed4809b00a0b63a5a3a3cb761f8b003d65d29.tar.xz
iurt-34fed4809b00a0b63a5a3a3cb761f8b003d65d29.zip
(clean_chroot) simplify using urpm::file_from_local_url()
-rw-r--r--lib/Iurt/Chroot.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 1ed50f6..a897d5d 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -95,8 +95,7 @@ sub clean_chroot {
my $rep = $run->{additional_media}{repository};
if (urpm::is_local_url($rep)) {
my $mount_point = "$chroot/urpmi_medias";
- my $url = $rep;
- $url =~ s!^file://!!;
+ my $url = urpm::file_from_local_url($rep);
sudo($config, '--mkdir', '-p', $mount_point);
if (!sudo($config, '--bindmount', $url, $mount_point)) {
plog('ERROR', "Failed to mount $url on $mount_point");