From: Holger Lindemann Date: Fri, 4 Feb 2011 13:25:29 +0000 (+0100) Subject: Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp X-Git-Tag: release-2.6.3~91 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/829739e443b212f6edc08e93f20f9c259c1cee79?hp=af9274d61eafcdd8b8283959671cb402b8058a80 Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp --- diff --git a/VERSION b/VERSION index 097a15a2a..3e9dc5c90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.2 +2.6.3-unstable diff --git a/locale/de_DE/all b/locale/de_DE/all index 7c0ce497e..11d7d4169 100644 --- a/locale/de_DE/all +++ b/locale/de_DE/all @@ -232,6 +232,7 @@ $self->{texts} = { 'BOM' => 'Stückliste', 'BWA' => 'BWA', 'Back' => 'Zurück', + 'Back to the login page' => 'Zurück zur Loginseite', 'Backup Dataset' => 'Datenbank sichern', 'Backup file' => 'Sicherungsdatei', 'Backup of dataset' => 'Sicherung der Datenbank', @@ -1681,7 +1682,7 @@ $self->{texts} = { 'The selected bin does not exist.' => 'Der ausgewählte Lagerplatz existiert nicht.', 'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', 'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', - 'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.', + 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder die Suche ergab keine Übereinstimmungen.', 'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.', 'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.', 'The subject is missing.' => 'Der Betreff fehlt.', diff --git a/locale/en/all b/locale/en/all index c95febd0a..cedc53810 100644 --- a/locale/en/all +++ b/locale/en/all @@ -232,6 +232,7 @@ $self->{texts} = { 'BOM' => '', 'BWA' => '', 'Back' => '', + 'Back to the login page' => '', 'Backup Dataset' => '', 'Backup file' => '', 'Backup of dataset' => '', @@ -1680,7 +1681,7 @@ $self->{texts} = { 'The selected bin does not exist.' => '', 'The selected exports have been closed.' => '', 'The selected warehouse does not exist.' => '', - 'The selected warehouse is empty.' => '', + 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => '', 'The session is invalid or has expired.' => '', 'The source warehouse does not contain any bins.' => '', 'The subject is missing.' => '', diff --git a/scripts/find-use.pl b/scripts/find-use.pl index 63bbc0e8e..97f5ad2d0 100644 --- a/scripts/find-use.pl +++ b/scripts/find-use.pl @@ -1,60 +1,114 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -l +use strict; +#use warnings; # corelist and find throw tons of warnings +use Module::CoreList; +use File::Find; +use SL::InstallationCheck; + +my (%uselines, %modules, %supplied); + +find(sub { + return unless /(\.p[lm]|console)$/; + + # remember modules shipped with Lx-Office + $supplied{modulize($File::Find::name)}++ + if $File::Find::dir =~ m#modules/#; + + open my $fh, '<', $_ or warn "can't open $_: $!"; + while (<$fh>) { + chomp; + next if !/^use /; + next if /SL::/; + next if /Support::Files/; # our own test support module + next if /use (warnings|strict|vars|lib|constant|utf8)/; + + my ($useline) = m/^use\s+(.*?)$/; + + next if $useline =~ /^[\d.]+;/; # skip version requirements + next if !$useline; + + $uselines{$useline}++; + } +}, '.'); + +for my $useline (keys %uselines) { + $useline =~ s/#.*//; # kill comments + + # modules can be loaded implicit with use base qw(Module) or use parent + # 'Module'. catch these: + my ($module, $args) = $useline =~ / + (?: + (?:base|parent) + \s + (?:'|"|qw.) + )? # optional parent block + ([\w:]+) # the module + (.*) # args + /ix; + + # some comments looks very much like use lines + # try to get rid of them + next if $useline =~ /^it like a normal Perl node/; # YAML::Dump comment + 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'; +} + +print sprintf "%8s : %s", $modules{$_}, $_ + for sort { + $modules{$a} cmp $modules{$b} + || $a cmp $b + } keys %modules; + +sub modulize { + for (my ($name) = @_) { + s#^./modules/\w+/##; + s#.pm$##; + s#/#::#g; + return $_; + } +} + +sub is_documented { + my ($module) = @_; + return grep { $_->{name} eq $module } @SL::InstallationCheck::required_modules; +} + +__END__ + =head1 NAME find-use =head1 EXAMPLE - ~/ledgersmb # utils/devel/find-use - 0.000000 : HTML::Entities - 0.000000 : Locale::Maketext::Lexicon - 0.000000 : Module::Build - ... + # perl scipts/find-use.pl + missing : Perl::Tags + missing : Template::Constants + missing : DBI -=head1 EXPLINATION +=head1 EXPLANATION -This util is useful for package builders to identify all the CPAN dependencies we've made. It required Module::CoreList (which is core, but is not yet in any stable -release of perl) to determine if a module is distributed with perl or not. The output reports which version of perl the module is in. If it reports 0.000000, then the -module is not in core perl, and needs to be installed before Lx-Office will operate. +This util is useful for package builders to identify all the CPAN dependencies +we've made. It requires Module::CoreList (which is core, but is not in most +stable releases of perl) to determine if a module is distributed with perl or +not. The output reports which version of perl the module is in. If it reports +0.000000, then the module is not in core perl, and needs to be installed before +Lx-Office will operate. =head1 AUTHOR http://www.ledgersmb.org/ - The LedgerSMB team +Sven Schöling Es.schoeling@linet-services.deE =head1 LICENSE Distributed under the terms of the GNU General Public License v2. -=cut - -use strict; -use warnings; - -open GREP, "grep -r '^use ' . |"; -use Module::CoreList; - -my %uselines; -while() { - next if /SL::/; - next if /LX::/; - next if /use warnings/; - next if /use strict/; - next if /use vars/; - chomp; - my ($file, $useline) = m/^([^:]+):use\s(.*?)$/; - $uselines{$useline}||=[]; - push @{$uselines{$useline}}, $file; -} - -my %modules; -foreach my $useline (keys %uselines) { - - my ($module) = grep { $_ } $useline =~ /(?:base ['"]([a-z:]+)|([a-z:]+)(?:\s|;))/i; - my $version = Module::CoreList->first_release($module); - $modules{$module} = $version||0; -} +=cut -foreach my $mod (sort { $modules{$a} == 0 ? -1 : $modules{$b} == 0 ? 1 : 0 or $a cmp $b } keys %modules) { - printf "%2.6f : %s\n", $modules{$mod}, $mod; -}