From ecd9e568ec0aea21aa88cc9989e23abb1bff7135 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 5 Jun 2014 15:36:31 +0200 Subject: [PATCH] =?utf8?q?Rose-Model-Generator:=20auf=20Duplikate=20in=20B?= =?utf8?q?lacklist/Paketnamenshash=20pr=C3=BCfen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- scripts/rose_auto_create_model.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(); -- 2.20.1