aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-04-17 20:50:02 +0000
committerThierry Vignaud <tv@mageia.org>2012-04-17 20:50:02 +0000
commit6b2fae8cad48c6541a5f75819d44fa7686b92d5e (patch)
tree4da6efd4888df2a98205fd1ef35682bc5ab6c622
parent44be121fe222b858036acdf3f989860ed91b6e1a (diff)
downloadiurt-6b2fae8cad48c6541a5f75819d44fa7686b92d5e.tar
iurt-6b2fae8cad48c6541a5f75819d44fa7686b92d5e.tar.gz
iurt-6b2fae8cad48c6541a5f75819d44fa7686b92d5e.tar.bz2
iurt-6b2fae8cad48c6541a5f75819d44fa7686b92d5e.tar.xz
iurt-6b2fae8cad48c6541a5f75819d44fa7686b92d5e.zip
(clean_chroot,urpmi_command) factorize/simplify a test
("needed" for next commit)
-rw-r--r--lib/Iurt/Chroot.pm2
-rw-r--r--lib/Iurt/Urpmi.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 870d54f..b40fe41 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -92,7 +92,7 @@ sub clean_chroot {
if ($run->{additional_media} && $run->{additional_media}{repository}) {
my $rep = $run->{additional_media}{repository};
- if ($rep !~ m/^(http:|ftp:)/) {
+ if ($rep !~ m/^(http|ftp):)/) {
my $mount_point = "$chroot/urpmi_medias";
my $url = $rep;
$url =~ s!^file://!!;
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index a70febf..73811bc 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -120,7 +120,7 @@ sub urpmi_command {
$name =~ s![/:]!_!g;
my $url;
- if ($run->{additional_media}{repository} =~ m!^(http:|ftp:)!) {
+ if ($run->{additional_media}{repository} =~ m!^(http|ftp):!) {
$url = $run->{additional_media}{repository};
}
else {