summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/harddrake2
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-08-18 14:57:27 +0000
committerOlivier Blin <oblin@mandriva.com>2008-08-18 14:57:27 +0000
commit9825534728892ab93876532d4d65a26254ea19f1 (patch)
treef1cc43385eaf53c63ab7d9168bfca1a832f8d33a /perl-install/standalone/harddrake2
parentcf462e7f67b1b777043e1db1b4787144d6ef0331 (diff)
downloaddrakx-9825534728892ab93876532d4d65a26254ea19f1.tar
drakx-9825534728892ab93876532d4d65a26254ea19f1.tar.gz
drakx-9825534728892ab93876532d4d65a26254ea19f1.tar.bz2
drakx-9825534728892ab93876532d4d65a26254ea19f1.tar.xz
drakx-9825534728892ab93876532d4d65a26254ea19f1.zip
extract openoffice hack from the light rpmsrate abstraction (to be used by other tools)
Diffstat (limited to 'perl-install/standalone/harddrake2')
-rwxr-xr-xperl-install/standalone/harddrake28
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 6b733e158..9d745feb5 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -503,7 +503,7 @@ $tree->signal_connect(realize => sub { $tree->get_selection->select_path(Gtk2::T
$SIG{CHLD} = undef;
#local $SIG{CHLD} = sub {};
- if (my @packages = difference2([ simple_read_rpmsrate() ], [ qw(ati.2 dmraid gnome-alsamixer mdadm xmms-alsa) ])) {
+ if (my @packages = difference2([ 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 $_:
@@ -582,5 +582,9 @@ sub popup_menu {
sub simple_read_rpmsrate() {
require pkgs;
my ($rates, $flags) = pkgs::read_rpmsrate({}, { }, '/usr/share/meta-task/rpmsrate-raw', 0);
- grep { !/openoffice/ && member('TRUE', @{$flags->{$_}}) && $rates->{$_} >= 5 } keys %$flags;
+ grep { member('TRUE', @{$flags->{$_}}) && $rates->{$_} >= 5 } keys %$flags;
+}
+
+sub list_hardware_packages() {
+ grep { !/openoffice/ } simple_read_rpmsrate();
}