From fdd91c0104722089582ffaac0c537f6ba4a76020 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 May 2013 03:51:49 +0000 Subject: cache value (thus logging only once) (needed for next commits) --- perl-install/install/any.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install') 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); -- cgit v1.2.1