summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-08-18 14:59:01 +0000
committerOlivier Blin <oblin@mandriva.com>2008-08-18 14:59:01 +0000
commit07a5a611fd36f268d32eafe57c3b586e85e51181 (patch)
tree0b50f014854b9dbba1bfec50b5402e83a548a976 /perl-install
parent9825534728892ab93876532d4d65a26254ea19f1 (diff)
downloaddrakx-backup-do-not-use-07a5a611fd36f268d32eafe57c3b586e85e51181.tar
drakx-backup-do-not-use-07a5a611fd36f268d32eafe57c3b586e85e51181.tar.gz
drakx-backup-do-not-use-07a5a611fd36f268d32eafe57c3b586e85e51181.tar.bz2
drakx-backup-do-not-use-07a5a611fd36f268d32eafe57c3b586e85e51181.tar.xz
drakx-backup-do-not-use-07a5a611fd36f268d32eafe57c3b586e85e51181.zip
move rpmsrate functions in pkgs module
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm11
-rwxr-xr-xperl-install/standalone/harddrake213
2 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 405bfe75b..be139d6c5 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -140,4 +140,15 @@ sub read_rpmsrate {
return ($rates, $flags) if $::isStandalone;
}
+
+sub simple_read_rpmsrate() {
+ require pkgs;
+ my ($rates, $flags) = read_rpmsrate({}, { }, '/usr/share/meta-task/rpmsrate-raw', 0);
+ grep { member('TRUE', @{$flags->{$_}}) && $rates->{$_} >= 5 } keys %$flags;
+}
+
+sub list_hardware_packages() {
+ grep { !/openoffice/ } simple_read_rpmsrate();
+}
+
1;
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 9d745feb5..92bffcb2d 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -16,6 +16,7 @@ use ugtk2 qw(:create :helpers :wrappers);
use interactive;
use harddrake::data; #- needs to stay after use-ugtk2 as long as this module defines globals containing some N()
use fsedit;
+use pkgs;
use POSIX qw(:sys_wait_h);
@@ -503,7 +504,7 @@ $tree->signal_connect(realize => sub { $tree->get_selection->select_path(Gtk2::T
$SIG{CHLD} = undef;
#local $SIG{CHLD} = sub {};
- if (my @packages = difference2([ list_hardware_packages() ], [ qw(ati.2 dmraid gnome-alsamixer mdadm xmms-alsa) ])) {
+ if (my @packages = difference2([ pkgs::list_hardware_packages() ], [ qw(ati.2 dmraid gnome-alsamixer mdadm xmms-alsa) ])) {
@packages = grep { !$in->do_pkgs->is_installed($_) } @packages;
# workarounding do_pkgs->is_available() destroying $_:
@@ -578,13 +579,3 @@ sub popup_menu {
return 0;
};
}
-
-sub simple_read_rpmsrate() {
- require pkgs;
- my ($rates, $flags) = pkgs::read_rpmsrate({}, { }, '/usr/share/meta-task/rpmsrate-raw', 0);
- grep { member('TRUE', @{$flags->{$_}}) && $rates->{$_} >= 5 } keys %$flags;
-}
-
-sub list_hardware_packages() {
- grep { !/openoffice/ } simple_read_rpmsrate();
-}