summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:27:33 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:27:33 +0000
commit6e2582725a083b47c0f0c0c3c25de4052754a38f (patch)
tree2c2788c00b93dca5500f1e637f17aee56cf001f7 /perl-install
parentd8c8fb86f15c3dae2f414f664e96549aa3260e6e (diff)
downloaddrakx-backup-do-not-use-6e2582725a083b47c0f0c0c3c25de4052754a38f.tar
drakx-backup-do-not-use-6e2582725a083b47c0f0c0c3c25de4052754a38f.tar.gz
drakx-backup-do-not-use-6e2582725a083b47c0f0c0c3c25de4052754a38f.tar.bz2
drakx-backup-do-not-use-6e2582725a083b47c0f0c0c3c25de4052754a38f.tar.xz
drakx-backup-do-not-use-6e2582725a083b47c0f0c0c3c25de4052754a38f.zip
(_mirrors_raw_standalone) split it out of mirrors_raw()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/mirror.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/perl-install/mirror.pm b/perl-install/mirror.pm
index 2df0fd09a..b9ee55ba2 100644
--- a/perl-install/mirror.pm
+++ b/perl-install/mirror.pm
@@ -66,6 +66,18 @@ sub _mirrors_raw_install {
@lines;
}
+sub _mirrors_raw_standalone {
+ my ($list) = @_;
+ my @lines;
+ if (ref($downloader)) {
+ @lines = $downloader->($list);
+ @lines or die "mirror list not found";
+ } else {
+ die "Missing download callback";
+ }
+ @lines;
+}
+
sub mirrors_raw {
my ($product_id) = @_;
@@ -79,12 +91,7 @@ sub mirrors_raw {
if ($::isInstall) {
@lines = _mirrors_raw_install($list);
} else {
- if (ref($downloader)) {
- @lines = $downloader->($list);
- @lines or die "mirror list not found";
- } else {
- die "Missing download callback";
- }
+ @lines = _mirrors_raw_standalone($list);
}
map { common::parse_LDAP_namespace_structure(chomp_($_)) } @lines;
}