]> wagnertech.de Git - mfinanz.git/commitdiff
Rose-Model-Generator: auf Duplikate in Blacklist/Paketnamenshash prüfen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 5 Jun 2014 13:36:31 +0000 (15:36 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 5 Jun 2014 13:38:33 +0000 (15:38 +0200)
scripts/rose_auto_create_model.pl

index 14fea7955c793896fd654050fe6a260840380ff2..26770c3c4ce0eba95ddd3dbe531360ad3ac89583 100755 (executable)
@@ -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();