summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-06-03 13:32:13 +0000
committerThierry Vignaud <tv@mandriva.org>2009-06-03 13:32:13 +0000
commitf90c78a72aea827f83d561db51c7ffa61a21ee5f (patch)
tree9d69987067de22bdda7089511ad38e5c67ba07f4 /mdkapplet
parent22aaf8d2724c8fc0702eef4b5112fdc46954bd84 (diff)
downloadmgaonline-f90c78a72aea827f83d561db51c7ffa61a21ee5f.tar
mgaonline-f90c78a72aea827f83d561db51c7ffa61a21ee5f.tar.gz
mgaonline-f90c78a72aea827f83d561db51c7ffa61a21ee5f.tar.bz2
mgaonline-f90c78a72aea827f83d561db51c7ffa61a21ee5f.tar.xz
mgaonline-f90c78a72aea827f83d561db51c7ffa61a21ee5f.zip
(get_product_id) factorize code (needed for next commit)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index 1f37a0d9..703aa4fa 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -296,9 +296,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();
@@ -718,7 +722,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);