]> git.decadent.org.uk Git - dak.git/blobdiff - dak/init_db.py
Actualy close bugs associated to removed packaged on request
[dak.git] / dak / init_db.py
index b0589b131b9f05ae8ed38c2ddeedaff7b06b12d9..169f30057cb1d91ff94881057926f8dc4a0dbcb9 100755 (executable)
@@ -127,13 +127,15 @@ class InitDB(object):
         s.commit()
 
     def do_suite(self):
-        """Initalize the suite table."""
+        """Initialize the suite table."""
 
         s = self.projectB.session()
         s.query(Suite).delete()
 
         for suite in self.Cnf.SubTree("Suite").List():
+            suite = suite.lower()
             su = Suite()
+            su.suite_name  = suite
             su.version     = self.Cnf.get("Suite::%s::Version" % suite, "-")
             su.origin      = self.Cnf.get("Suite::%s::Origin" % suite, "")
             su.description = self.Cnf.get("Suite::%s::Description" % suite, "")
@@ -141,11 +143,11 @@ class InitDB(object):
 
             for architecture in self.Cnf.ValueList("Suite::%s::Architectures" % (suite)):
                 sa = SuiteArchitecture()
-                sa.suite_id = su.suite_id
                 a = s.query(Architecture).filter_by(arch_string=architecture)
                 if a.count() < 1:
                     utils.fubar("E: Architecture %s not found for suite %s" % (architecture, suite))
                 sa.arch_id = a.one().arch_id
+                sa.suite_id = su.suite_id
                 s.add(sa)
 
         s.commit()
@@ -172,7 +174,7 @@ class InitDB(object):
         for priority in self.Cnf.SubTree("Priority").List():
             p = Priority()
             p.priority = priority
-            p.level    = self.Cnf.get("Priority::%s", 0)
+            p.level    = self.Cnf.get("Priority::" + priority, "0")
             s.add(p)
 
         s.commit()