summaryrefslogtreecommitdiffstats
path: root/mdkonline.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-11-26 15:45:57 +0000
committerThierry Vignaud <tv@mandriva.org>2009-11-26 15:45:57 +0000
commit90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e (patch)
treeada79e605bd50b8df66b81a2067638a76beaac8d /mdkonline.pm
parent8fd39a2250f28727c68367f4cc59fade2ab22c3f (diff)
downloadmgaonline-90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e.tar
mgaonline-90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e.tar.gz
mgaonline-90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e.tar.bz2
mgaonline-90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e.tar.xz
mgaonline-90061efdc5e8f6bdd0858bf2405e9a53b7f65a0e.zip
(is_enterprise_media_supported, is_restricted_media_supported) move
them into shared module (needed for next commits)
Diffstat (limited to 'mdkonline.pm')
-rw-r--r--mdkonline.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/mdkonline.pm b/mdkonline.pm
index b18a12ea..b605e976 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -34,6 +34,8 @@ our @EXPORT = qw(fork_exec
get_banner
get_product_id
get_stale_upgrade_filename
+ is_enterprise_media_supported
+ is_restricted_media_supported
xml2perl
$product_id
$root);
@@ -59,6 +61,14 @@ sub get_release() {
($r);
}
+sub is_enterprise_media_supported() {
+ to_bool($product_id->{type} eq 'Enterprise' && $product_id->{product} eq 'Server');
+}
+
+sub is_restricted_media_supported() {
+ to_bool($product_id->{product} =~ /powerpack/i);
+}
+
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";