summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-06-03 13:32:40 +0000
committerThierry Vignaud <tv@mandriva.org>2009-06-03 13:32:40 +0000
commit7a487499fb4b15c3bc3aa72264f8b68335ad1639 (patch)
treed7bb9d5de4121a4eed2d0b89b76203d9519217c2
parentb9d03cd7c25cfb3b267ada0604225e26506ed0cd (diff)
downloadmgaonline-7a487499fb4b15c3bc3aa72264f8b68335ad1639.tar
mgaonline-7a487499fb4b15c3bc3aa72264f8b68335ad1639.tar.gz
mgaonline-7a487499fb4b15c3bc3aa72264f8b68335ad1639.tar.bz2
mgaonline-7a487499fb4b15c3bc3aa72264f8b68335ad1639.tar.xz
mgaonline-7a487499fb4b15c3bc3aa72264f8b68335ad1639.zip
(get_product_id) factorize code (needed for next commit) (backported from trunk)
-rwxr-xr-xmdkapplet8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index 81741be3..2ccff40d 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -284,9 +284,13 @@ sub get_distro_list() {
};
}
+sub get_product_id() {
+ $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
+}
+
sub is_there_a_new_distributions() {
- $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
+ get_product_id();
return if $product_id->{product} =~ /Flash/;
my @lines = get_distro_list();
@@ -694,7 +698,7 @@ sub get_enabled_restricted_media {
sub is_restricted_media_configured {
my ($urpm) = @_;
- $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
+ get_product_id();
return 1 if $product_id->{product} !~ /powerpack/i;
my @restricted_media = get_enabled_restricted_media($urpm);