From 30632b2a9c6f595f5a785663539a831badb0b228 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 19 Nov 2008 14:19:35 +0000 Subject: (get_distro_list) split it out of is_there_a_new_distributions() --- mdkapplet | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mdkapplet b/mdkapplet index 8239189b..54b7a276 100755 --- a/mdkapplet +++ b/mdkapplet @@ -262,10 +262,7 @@ Gtk2->main; ugtk2::exit(0); - -sub is_there_a_new_distributions() { - $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id")); - return if $product_id->{product} =~ /Flash/; +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-' : ''; @@ -288,6 +285,15 @@ sub is_there_a_new_distributions() { urpm::download::get_content($urpm, $list); } }; +} + + +sub is_there_a_new_distributions() { + $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id")); + return if $product_id->{product} =~ /Flash/; + + my @lines = get_distro_list(); + use Data::Dumper; warn Dumper \@lines; if (my $err = $@) { log::explanations("failed to download distribution list:\n$err"); -- cgit v1.2.1