summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-11-26 15:45:50 +0000
committerThierry Vignaud <tv@mandriva.org>2009-11-26 15:45:50 +0000
commitb7351c14d316ead469e646ae1063a7ad236364ed (patch)
tree7107f267cf766a25e2e04ab15a3c19285fcbfa09
parent9cc4fcc496845603d5db911ee274783f427c257c (diff)
downloadmgaonline-b7351c14d316ead469e646ae1063a7ad236364ed.tar
mgaonline-b7351c14d316ead469e646ae1063a7ad236364ed.tar.gz
mgaonline-b7351c14d316ead469e646ae1063a7ad236364ed.tar.bz2
mgaonline-b7351c14d316ead469e646ae1063a7ad236364ed.tar.xz
mgaonline-b7351c14d316ead469e646ae1063a7ad236364ed.zip
move get_product_id() into shared module
(needed for next commits)
-rwxr-xr-xmdkapplet8
-rw-r--r--mdkonline.pm8
2 files changed, 8 insertions, 8 deletions
diff --git a/mdkapplet b/mdkapplet
index efad95aa..db40f2cf 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -246,7 +246,7 @@ foreach my $opt (@ARGV) {
}
}
-my ($root, $download_dir, $download_all);
+my ($download_dir, $download_all);
{
my $temp_urpm = Rpmdrake::open_db::fast_open_urpmi_db();
$root = $temp_urpm->{root};
@@ -254,7 +254,6 @@ my ($root, $download_dir, $download_all);
}
my ($new_distro, $no_more_supported);
-my $product_id;
shouldStart() or die "$localfile should be set to TRUE: please use --force or -f option to launch applet\n";
@@ -312,11 +311,6 @@ 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() {
get_product_id();
return if $product_id->{product} =~ /Flash/;
diff --git a/mdkonline.pm b/mdkonline.pm
index 48b9fb4d..88b5c63b 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -30,8 +30,10 @@ use common;
use ugtk2;
our @ISA = qw(Exporter);
-our @EXPORT = qw(fork_exec get_banner get_stale_upgrade_filename xml2perl);
+our @EXPORT = qw(fork_exec get_banner get_product_id get_stale_upgrade_filename xml2perl
+ $product_id $root);
+our ($product_id, $root);
our $version = 2.67;
use log;
@@ -43,6 +45,10 @@ sub get_stale_upgrade_filename() {
'/var/lib/urpmi/stale_upgrade_in_progress';
}
+sub get_product_id() {
+ $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
+}
+
sub get_release() {
my ($r) = cat_($release_file) =~ /release\s+(\S+)/;
($r);