From 3423b1fe4212be6ae5dc64a570b784f9b3aa0289 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 3 Jul 2011 20:03:26 -0400 Subject: [PATCH] Remove %package_opts from output messaging. At this point the only functions that reference the global package_opts are the option handling functions (both normal and persistent options) which can be factored into the build context and Module. --- kdesrc-build | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/kdesrc-build b/kdesrc-build index 999b9b3..77dccf0 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -3977,21 +3977,9 @@ sub output_failed_module_lists } # See if any modules fail continuously and warn specifically for them. - my $persistent_opt = sub { - my $mod = shift; - - return ((exists $package_opts{$mod}{'persistent-options'}{'failure-count'}) and - (int $package_opts{$mod}{'persistent-options'}{'failure-count'} > 3)); - }; - - my @super_fail = grep { &{$persistent_opt}($_) }(keys %package_opts); - my @updatedModules = map { $_->name() } ($ctx->modulesInPhase('update')); - my @builtModules = map { $_->name() } ($ctx->modulesInPhase('build')); - - # Only show packages we're actually updating/building - @super_fail = grep { - list_has(@updatedModules, $_) || list_has(@builtModules, $_) - } (@super_fail); + my @super_fail = grep { + (get_persistent_option($_->name(), 'failure-count') // 0) > 3 + } (@{$ctx->moduleList()}); if (@super_fail) {