diff options
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index 3cf4366e..a5b4d16d 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -33,6 +33,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(find_current_distro fork_exec get_banner + get_distro_list_ get_distro_list get_from get_product_id @@ -78,7 +79,7 @@ sub find_current_distro { find { $_->{version} eq $product_id->{version} } @_; } -sub get_distro_list() { +sub get_distro_list_() { #- contact the following URL to retrieve the list of released distributions. my $type = lc($product_id->{type}); $type =~ s/\s//g; my $extra_path = $::testing || uc($config{TEST_DISTRO_UPGRADE}) eq 'YES' ? 'testing-' : ''; @@ -109,6 +110,25 @@ sub get_distro_list() { }; } +sub get_distro_list() { + return if $product_id->{product} =~ /Flash/; + + my @lines = get_distro_list_(); + + if (my $err = $@) { + log::explanations("failed to download distribution list:\n$err"); + return; # not a fatal error + } + + if (!@lines) { + log::explanations("empty distribution list"); + return; + } + + map { common::parse_LDAP_namespace_structure(chomp_($_)) } @lines; +} + + sub clean_confdir() { my $confdir = '/root/.MdkOnline'; system "/bin/rm", "-f", "$confdir/*log.bz2", "$confdir/*log.bz2.uue", "$confdir/*.dif $confdir/rpm_qa_installed_before", "$confdir/rpm_qa_installed_after"; |