summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-05-17 03:51:49 +0000
committerThierry Vignaud <tv@mageia.org>2013-05-17 03:51:49 +0000
commit382c9a018293be81cd78c35b06b725de6c1c6923 (patch)
tree22b9bc986d74c1e36fbe99ab898bc7bc7c976218 /perl-install
parentb9ec191fc1c25468824e2ab6635e72f2d952e4f0 (diff)
downloaddrakx-382c9a018293be81cd78c35b06b725de6c1c6923.tar
drakx-382c9a018293be81cd78c35b06b725de6c1c6923.tar.gz
drakx-382c9a018293be81cd78c35b06b725de6c1c6923.tar.bz2
drakx-382c9a018293be81cd78c35b06b725de6c1c6923.tar.xz
drakx-382c9a018293be81cd78c35b06b725de6c1c6923.zip
cache value (thus logging only once)
(needed for next commits)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/any.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index ed9ab1291..2eb23195d 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -323,7 +323,7 @@ sub _tainted_medium() { N("Tainted Release") }
sub _nonfree_medium() { N("Nonfree Release") }
# FIXME: move me in ../any.pm or in harddrake::*, might be needed by rpmdrake/harddrake:
-sub is_firmware_needed {
+sub is_firmware_needed_ {
my ($o) = @_;
require list_firmwares;
my @l = map { $_->{driver} } detect_devices::probeall();
@@ -336,6 +336,13 @@ sub is_firmware_needed {
@need || @xpkgs;
}
+sub is_firmware_needed {
+ my ($o) = @_;
+ state $res;
+ $res = is_firmware_needed_($o) if !defined $res;
+ $res;
+}
+
sub msg_if_firmware_needed {
my ($o) = @_;
return if !is_firmware_needed($o);