summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO')
-rw-r--r--lib/MGA/DrakISO/BuildMedia.pm2
-rw-r--r--lib/MGA/DrakISO/BuildRoot.pm4
-rw-r--r--lib/MGA/DrakISO/Utils.pm2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm
index dced6e5..b7a377d 100644
--- a/lib/MGA/DrakISO/BuildMedia.pm
+++ b/lib/MGA/DrakISO/BuildMedia.pm
@@ -579,7 +579,7 @@ sub read_repo_product_id {
my $src_file = $build->{settings}{repository} . '/' . $build->{settings}{arch} . '/product.id';
my $product_id;
- if ($src_file =~ m!^(ftp|http)://!) {
+ if ($src_file =~ m!^(ftp|https?)://!) {
$product_id = `curl --silent $src_file`;
$? and die "ERROR: couldn't fetch product.id file from repository\n";
} else {
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm
index b20dc34..995b419 100644
--- a/lib/MGA/DrakISO/BuildRoot.pm
+++ b/lib/MGA/DrakISO/BuildRoot.pm
@@ -62,7 +62,7 @@ sub install_live_system {
my $base_repository = $build->{settings}{repository};
my $arch_repository = $base_repository . '/' . $arch;
- my $remote_method = $arch_repository =~ m!^(ftp|http)://! && $1;
+ my $remote_method = $arch_repository =~ m!^(ftp|https?)://! && ($1 =~ s/https/http/r);
my $chroot = $build->get_chroot_dir;
@@ -683,7 +683,7 @@ sub copy_file_to_root {
my ($root, $dst_dir, $mode, $src_file) = @_;
my $dst_file = $dst_dir . '/' . basename($src_file);
- if ($src_file =~ m!^(ftp|http)://!) {
+ if ($src_file =~ m!^(ftp|https?)://!) {
run_as_root('curl', '--silent', '-o', $root . $dst_file, $src_file)
or die "ERROR: couldn't copy $src_file to $dst_file\n";
} else {
diff --git a/lib/MGA/DrakISO/Utils.pm b/lib/MGA/DrakISO/Utils.pm
index cb2702d..e604652 100644
--- a/lib/MGA/DrakISO/Utils.pm
+++ b/lib/MGA/DrakISO/Utils.pm
@@ -84,7 +84,7 @@ sub run_in_root {
sub copy_or_link {
my ($src_file, $dst_file) = @_;
mkdir_p(dirname($dst_file));
- if ($src_file =~ m!^(ftp|http)://!) {
+ if ($src_file =~ m!^(ftp|https?)://!) {
run_as_root('curl', '--silent', '-o', $dst_file, $src_file)
or die "ERROR: couldn't copy $src_file to $dst_file\n";
} else {