schema/spacewalk/schema-source-sanity-check.pl | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit c3075600d5903d128fdddf2497c11d3525b71cae
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 25 20:15:07 2011 +0100
For upgrades, missing PostgreSQL equivalent is an error.
diff --git a/schema/spacewalk/schema-source-sanity-check.pl
b/schema/spacewalk/schema-source-sanity-check.pl
index 36c6ce9..1b33dd2 100644
--- a/schema/spacewalk/schema-source-sanity-check.pl
+++ b/schema/spacewalk/schema-source-sanity-check.pl
@@ -52,8 +52,13 @@ for my $c (sort keys %{ $files{common} }) {
for my $c (sort keys %{ $files{oracle} }) {
next unless $c =~ /\.(sql|pks|pkb)$/;
if (not exists $files{postgres}{$c}) {
- print "Oracle file [$c] is not in postgres (ignoring for now)\n" if
$show_ignored;
- # $error = 1;
+ if ($c =~ /^upgrade/) {
+ print "Oracle file [$c] is not in PostgreSQL variant\n";
+ $error = 1;
+ } else {
+ print "Oracle file [$c] is not in postgres (ignoring for now)\n" if
$show_ignored;
+ # $error = 1;
+ }
}
}
commit 53d0fdc339b3ac8ef8bd267873d9d3d72a2dc44e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 25 20:09:40 2011 +0100
Catch situation when both .sql and .sql.oracle or .sql.postgresql schema upgrade
scripts exist.
diff --git a/schema/spacewalk/schema-source-sanity-check.pl
b/schema/spacewalk/schema-source-sanity-check.pl
index e4bbbe5..36c6ce9 100644
--- a/schema/spacewalk/schema-source-sanity-check.pl
+++ b/schema/spacewalk/schema-source-sanity-check.pl
@@ -25,11 +25,12 @@ for my $dir (qw( common oracle postgres upgrade )) {
}
if ($dir eq 'upgrade') {
my $generic = $name;
+ my $db = 'common';
if ($generic =~ s/\.(oracle|postgresql)$//) {
- my $db = $1;
+ $db = $1;
$db = 'postgres' if $db eq 'postgresql';
- $files{$db}{$generic} = $name;
}
+ $files{$db}{$generic} = $name;
} else {
my $rname = substr($name, length($dir) + 1);
$files{$dir}{$rname} = $name;
Show replies by thread