X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Finit_db.py;h=af0a03b2a3e32e32b3c125c4f4f9bc0d565c81e3;hb=fdf3c42445b4f11f4cd71634dd2b57cb7d7a4f36;hp=bbf682af31df026dc9614fa0a92c5d21d7458cea;hpb=66e52b75f85d576a84bf5b7127b79252378cbad9;p=dak.git diff --git a/dak/init_db.py b/dak/init_db.py index bbf682af..af0a03b2 100755 --- a/dak/init_db.py +++ b/dak/init_db.py @@ -55,7 +55,7 @@ class InitDB(object): self.projectB = projectB def do_archive(self): - """Initalize the archive table.""" + """initalize the archive table.""" c = self.projectB.cursor() c.execute("DELETE FROM archive") @@ -101,9 +101,6 @@ class InitDB(object): c = self.projectB.cursor() c.execute("DELETE FROM location") - loc_add_mixed = "INSERT INTO location (path, archive, type) " + \ - "VALUES (%s, %s, %s)" - loc_add = "INSERT INTO location (path, component, archive, type) " + \ "VALUES (%s, %s, %s, %s)" @@ -114,9 +111,7 @@ class InitDB(object): utils.fubar("Archive '%s' for location '%s' not found." % (location_config["Archive"], location)) location_type = location_config.get("type") - if location_type == "legacy-mixed": - c.execute(loc_add_mixed, [location, archive_id, location_config["type"]]) - elif location_type == "legacy" or location_type == "pool": + if location_type == "pool": for component in self.Cnf.SubTree("Component").List(): component_id = self.projectB.get_component_id(component) c.execute(loc_add, [location, component_id, archive_id, location_type]) @@ -148,8 +143,8 @@ class InitDB(object): architecture_id = self.projectB.get_architecture_id (architecture) if architecture_id < 0: utils.fubar("architecture '%s' not found in architecture" - " table for suite %s." - % (architecture, suite)) + " table for suite %s." + % (architecture, suite)) c.execute(sa_add, [architecture_id]) self.projectB.commit()