From: Joerg Jaspert Date: Fri, 30 Oct 2009 09:36:11 +0000 (+0100) Subject: Oh well X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fdc2e2dd3436a5663133ca35f3f4d39b35303a3;p=dak Oh well Signed-off-by: Joerg Jaspert --- diff --git a/dak/dakdb/update18.py b/dak/dakdb/update18.py index c462b16a..c3ace63d 100755 --- a/dak/dakdb/update18.py +++ b/dak/dakdb/update18.py @@ -118,6 +118,12 @@ def do_update(self): c.execute("CREATE INDEX changesdistribution_ind ON known_changes(distribution)") c.execute("CREATE INDEX changesurgency_ind ON known_changes(urgency)") + c.execute("GRANT ALL ON known_changes TO ftpmaster;") + c.execute("GRANT SELECT ON known_changes TO public;") + + c.execute("UPDATE config SET value = '18' WHERE name = 'db_revision'") + self.db.commit() + print "Done. Now looking for old changes files" count = 0 failure = 0 @@ -146,13 +152,6 @@ def do_update(self): warn("found invalid changes file, not properly utf-8 encoded") failure += 1 - - c.execute("GRANT ALL ON known_changes TO ftpmaster;") - c.execute("GRANT SELECT ON known_changes TO public;") - - c.execute("UPDATE config SET value = '18' WHERE name = 'db_revision'") - self.db.commit() - except psycopg2.ProgrammingError, msg: self.db.rollback() raise DBUpdateError, "Unable to apply knownchanges update 18, rollback issued. Error message : %s" % (str(msg))