schema/spacewalk/spacewalk-schema-upgrade | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
New commits: commit 4835b74a230bb49641b0e46e723c64f415ce2a2d Author: Jan Pazdziora jpazdziora@redhat.com Date: Mon Apr 16 13:59:52 2012 +0200
812453 - bring the schema version as recorded in the database in sync with the installed rpms, even if the difference is just the dist tag.
diff --git a/schema/spacewalk/spacewalk-schema-upgrade b/schema/spacewalk/spacewalk-schema-upgrade index 693b34e..823f7b0 100755 --- a/schema/spacewalk/spacewalk-schema-upgrade +++ b/schema/spacewalk/spacewalk-schema-upgrade @@ -63,17 +63,22 @@ print "Schema upgrade: [$start_schema] -> [$target_schema]\n"; my $retried = 0; RETRY:
-if ($start_schema_norm eq $target_schema_norm) { - warn "Your database schema already matches the schema package version [$target_schema_norm].\n"; +if ($start_schema eq $target_schema) { + warn "Your database schema already matches the schema package version [$target_schema].\n"; exit; } +my %upgrade_path; +my @queue = ( $target_schema_norm ); +if ($start_schema_norm eq $target_schema_norm) { + print "The schema version is the same, except for the dist tag.\n"; + @queue = (); + $upgrade_path{$target_schema_norm} = undef; +} if ($start_schema ne $start_schema_norm or $target_schema ne $target_schema_norm) { print "Searching for upgrade path: [$start_schema_norm] -> [$target_schema_norm]\n"; }
-my %upgrade_path; -my @queue = ( $target_schema_norm ); while (@queue) { my $t = shift @queue; my @lookup = glob "$SCHEMA_UPGRADE_DIR/*-to-$t";
spacewalk-commits@lists.fedorahosted.org