From: Mike O'Connor Date: Sat, 9 Jan 2010 20:29:55 +0000 (-0500) Subject: bride of bad index name X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=df2c7e1554c6bfeb27761112b8ddfe8223a66136;p=dak.git bride of bad index name Signed-off-by: Mike O'Connor --- diff --git a/dak/dakdb/update28.py b/dak/dakdb/update28.py index fcefadac..79b0e8db 100755 --- a/dak/dakdb/update28.py +++ b/dak/dakdb/update28.py @@ -148,14 +148,15 @@ def do_update(self): suite_id = suiterow[0] arch_list = arches(c, suite_id) arch_list = arches(c, suite_id) + suitestr=string.replace(suite,'-','_'); for (arch_id,arch_str) in arch_list: - suitestr=string.replace(suite,'-','_'); - c.execute( "CREATE INDEX ind_deb_contents_%s_%s ON deb_contents (arch,suite) WHERE (arch=2 OR arch=%s) AND suite='%s'"%(arch_str,suite,arch_id,suite_id) ) + arch_str = string.replace(arch_str,"-", "_") + c.execute( "CREATE INDEX ind_deb_contents_%s_%s ON deb_contents (arch,suite) WHERE (arch=2 OR arch=%s) AND suite='%s'"%(arch_str,suitestr,arch_id,suite_id) ) for section, sname in [("debian-installer","main"), ("non-free/debian-installer", "nonfree")]: - c.execute( "CREATE INDEX ind_udeb_contents_%s ON udeb_contents (section,suite) WHERE section='%s' AND suite='%s'"%(sname,section,suite_id) ) + c.execute( "CREATE INDEX ind_udeb_contents_%s_%s ON udeb_contents (section,suite) WHERE section='%s' AND suite='%s'"%(sname,suitestr,section,suite_id) ) c.execute( """CREATE OR REPLACE FUNCTION update_contents_for_bin_a() RETURNS trigger AS $$