summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-09-05 14:24:44 +0000
committerOlivier Blin <oblin@mandriva.com>2008-09-05 14:24:44 +0000
commit0773ca097f1d8674f72c0822fea209e692510ddf (patch)
tree5cca4bc461233cfaf7e2ec3e83d56a5f318c7719 /perl-install/pkgs.pm
parentf98cf01c4e171dfe43478594648dc4e6ac9a2c5a (diff)
downloaddrakx-backup-do-not-use-0773ca097f1d8674f72c0822fea209e692510ddf.tar
drakx-backup-do-not-use-0773ca097f1d8674f72c0822fea209e692510ddf.tar.gz
drakx-backup-do-not-use-0773ca097f1d8674f72c0822fea209e692510ddf.tar.bz2
drakx-backup-do-not-use-0773ca097f1d8674f72c0822fea209e692510ddf.tar.xz
drakx-backup-do-not-use-0773ca097f1d8674f72c0822fea209e692510ddf.zip
extract detect_unused_hardware_packages function
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 40d1cc976..e7809a048 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -203,4 +203,12 @@ sub detect_hardware_packages {
);
}
+sub detect_unused_hardware_packages {
+ my ($do_pkgs) = @_;
+ my @all_hardware_packages = detect_hardware_packages($do_pkgs, 'match_all_hardware');
+ my @used_hardware_packages = detect_hardware_packages($do_pkgs);
+ my @unneeded_hardware_packages = difference2(\@all_hardware_packages, \@used_hardware_packages);
+ $do_pkgs->are_installed(@unneeded_hardware_packages);
+}
+
1;