X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=scripts%2Ffind-use.pl;h=84129c29f3388e172d6087c0f8176b6f52ce7cdc;hb=6833aa9af01409d28ba7cf605357850f81b85682;hp=778f11ba83dad5160954d740c3c051755cacfdf7;hpb=f230209963a59ee6bc338be9763c7f501d917193;p=kivitendo-erp.git diff --git a/scripts/find-use.pl b/scripts/find-use.pl old mode 100644 new mode 100755 index 778f11ba8..84129c29f --- a/scripts/find-use.pl +++ b/scripts/find-use.pl @@ -79,10 +79,12 @@ for my $useline (keys %uselines) { next if $useline =~ /^most and offer that in a small/; # YAML my $version = Module::CoreList->first_release($module); - $modules{$module} = $supplied{$module} ? 'included' - : $version ? sprintf '%2.6f', $version - : is_documented($module) ? 'required' - : '!missing'; + $modules{$module} = { status => $supplied{$module} ? 'included' + : $version ? sprintf '%2.6f', $version + : is_documented($module) ? 'required' + : '!missing', + files => $uselines{$useline}, + }; # build requirement tree for my $file (@{ $uselines{$useline} }) { @@ -99,19 +101,21 @@ while ($changed) { $changed = 0; for my $src_module (keys %requires) { for my $dst_module (keys %{ $requires{$src_module} }) { - if ( $modules{$src_module} =~ /^required/ - && $modules{$dst_module} eq '!missing') { - $modules{$dst_module} = "required"; # . ", via $src_module"; + if ( $modules{$src_module} + && $modules{$dst_module} + && $modules{$src_module}->{status} =~ /^required/ + && $modules{$dst_module}->{status} eq '!missing') { + $modules{$dst_module}->{status} = "required"; # . ", via $src_module"; $changed = 1; } } } } -print sprintf "%8s : %s", color_text($modules{$_}), $_ +print sprintf "%8s : %s (%s)", color_text($modules{$_}->{status}), $_, join(' ', @{ $modules{$_}->{files} || [] }) for sort { - $modules{$a} cmp $modules{$b} - || $a cmp $b + $modules{$a}->{status} cmp $modules{$b}->{status} + || $a cmp $b } keys %modules; sub modulize { @@ -184,11 +188,13 @@ This module is included in C. Don't worry about it. This module is documented in C to be necessary, or is a dependancy of one of these. Everything alright. -= item !missing +=item !missing These modules are neither core, nor included, nor required. This is ok for developer tools, but should never occur for modules the actual program uses. +=back + =head1 AUTHOR http://www.ledgersmb.org/ - The LedgerSMB team