diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-06-03 13:32:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-06-03 13:32:13 +0000 |
commit | f90c78a72aea827f83d561db51c7ffa61a21ee5f (patch) | |
tree | 9d69987067de22bdda7089511ad38e5c67ba07f4 /mdkapplet | |
parent | 22aaf8d2724c8fc0702eef4b5112fdc46954bd84 (diff) | |
download | mgaonline-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-x | mdkapplet | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |