From: Moritz Bunkus Date: Thu, 5 Jun 2014 13:36:31 +0000 (+0200) Subject: Rose-Model-Generator: auf Duplikate in Blacklist/Paketnamenshash prüfen X-Git-Tag: release-3.2.0beta~417 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ecd9e568ec0aea21aa88cc9989e23abb1bff7135;p=kivitendo-erp.git Rose-Model-Generator: auf Duplikate in Blacklist/Paketnamenshash prüfen --- diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index 14fea7955..26770c3c4 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -320,8 +320,19 @@ sub notice { print @_, $/; } +sub check_errors_in_package_names { + foreach my $domain (sort keys %package_names) { + my @both = grep { $package_names{$domain}->{$_} } @{ $blacklist{$domain} || [] }; + next unless @both; + + print "Error: domain '$domain': The following table names are present in both the black list and the package name hash: ", join(' ', sort @both), "\n"; + exit 1; + } +} + parse_args(\%config); setup(); +check_errors_in_package_names(); my %tables_by_domain = make_tables();