5 Pending contents disinguished by arch
7 @contact: Debian FTP Master <ftpmaster@debian.org>
8 @copyright: 2008 Michael Casadevall <mcasadevall@debian.org>
9 @copyright: 2009 Mike O'Connor <stew@debian.org>
10 @license: GNU General Public License version 2 or later
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 ################################################################################
29 # * Ganneff ponders how to best write the text to -devel. (need to tell em in
30 # case they find more bugs). "We fixed the fucking idiotic broken implementation
31 # to be less so" is probably not the nicest, even if perfect valid, way to say so
33 ################################################################################
37 from daklib.dak_exceptions import DBUpdateError
38 from daklib.utils import get_conf
40 ################################################################################
43 print "pending_contents should distinguish by arch"
49 c.execute("DELETE FROM pending_content_associations")
50 c.execute("""ALTER TABLE pending_content_associations
51 ADD COLUMN architecture integer NOT NULL""")
52 c.execute("""ALTER TABLE ONLY pending_content_associations
53 ADD CONSTRAINT pending_content_assiciations_arch
54 FOREIGN KEY (architecture)
55 REFERENCES architecture(id)
57 c.execute("UPDATE config SET value = '9' WHERE name = 'db_revision'")
60 except psycopg2.ProgrammingError as msg:
62 raise DBUpdateError("Unable to apply suite config updates, rollback issued. Error message : %s" % (str(msg)))