summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-12 19:31:03 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-12 19:31:03 +0000
commit95e031578306cf1ef7656404d3e2b49db80497f4 (patch)
treea96c4252a6cc3b13ea2f5f911af4318390df1f9a /perl-install
parent7dd226f80f477a768b808a4efe761f78c345c247 (diff)
downloaddrakx-95e031578306cf1ef7656404d3e2b49db80497f4.tar
drakx-95e031578306cf1ef7656404d3e2b49db80497f4.tar.gz
drakx-95e031578306cf1ef7656404d3e2b49db80497f4.tar.bz2
drakx-95e031578306cf1ef7656404d3e2b49db80497f4.tar.xz
drakx-95e031578306cf1ef7656404d3e2b49db80497f4.zip
(cmp_kernel_versions) move it from any.pm to common.pm; thus preventing lazy loading of syscall.ph through
any->detect_devices>modules>list_modules>MDK::Common>MDK::Common::System>syscall.ph This can end in crashing mgaaplet when performing live update (mga#3042) because of lazy loading of syscall (by which time perl may as well have been updated including syscall.ph which leave eg perl/5.12.x for perl/5.14.x) This also saves quite some memory for: - net_applet (5Mb aka 11%), - mgapplet (7Mb aka 14%) (as well as maybe for drakxnet but that's more transient): 21736 root 20 0 240m 44m 10m S 0 1.1 0:00.63 net_applet 21501 root 20 0 236m 39m 11m S 0 1.0 0:01.09 net_applet 23116 root 20 0 297m 50m 12m S 0 1.3 0:00.58 mgaapplet 23259 root 20 0 290m 43m 12m S 0 1.1 0:00.40 mgaapplet
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/any.pm12
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/common.pm12
4 files changed, 17 insertions, 13 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index d6cf1a337..3b9ddda54 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,7 @@
+- fix mgaapplet crashing on live migration when there's a new major version of
+ perl (mga#3042)
+- reduce resident memory of net_applet (5Mb aka 11%) & mgapplet (7Mb aka 14%)
+
Version 13.92 - 11 March 2012
- english message improvement (mga#456)
diff --git a/perl-install/any.pm b/perl-install/any.pm
index fb14558f8..056566314 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -103,18 +103,6 @@ sub add_users {
}
}
-sub cmp_kernel_versions {
- my ($va, $vb) = @_;
- my $rel_a = $va =~ s/-(.*)$// && $1;
- my $rel_b = $vb =~ s/-(.*)$// && $1;
- ($va, $vb) = map { [ split /[.-]/ ] } $va, $vb;
- my $r = 0;
- mapn_ {
- $r ||= $_[0] <=> $_[1];
- } $va, $vb;
- $r || $rel_a <=> $rel_b || $rel_a cmp $rel_b;
-}
-
sub install_bootloader_pkgs {
my ($do_pkgs, $b) = @_;
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 02de18bb8..28a21a242 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -903,7 +903,7 @@ sub get_kernel_labels {
my ($kernels) = @_;
my @kernels_str =
- sort { any::cmp_kernel_versions($b->{version_no_ext}, $a->{version_no_ext}) }
+ sort { common::cmp_kernel_versions($b->{version_no_ext}, $a->{version_no_ext}) }
grep { -d "$::prefix/lib/modules/$_->{version}" }
map { vmlinuz2kernel_str($_) } @$kernels;
diff --git a/perl-install/common.pm b/perl-install/common.pm
index adaa07a0d..7aea9bc17 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -488,4 +488,16 @@ sub update_gnomekderc_no_create {
}
}
+sub cmp_kernel_versions {
+ my ($va, $vb) = @_;
+ my $rel_a = $va =~ s/-(.*)$// && $1;
+ my $rel_b = $vb =~ s/-(.*)$// && $1;
+ ($va, $vb) = map { [ split /[.-]/ ] } $va, $vb;
+ my $r = 0;
+ mapn_ {
+ $r ||= $_[0] <=> $_[1];
+ } $va, $vb;
+ $r || $rel_a <=> $rel_b || $rel_a cmp $rel_b;
+}
+
1;