]> git.decadent.org.uk Git - dak.git/blobdiff - dak/generate_releases.py
dak/generate_releases.py: pull components from the database
[dak.git] / dak / generate_releases.py
index 72fb4304e1b99571e05bcebc5789b9a7ab1c1cd6..03081627dd27df5e29a0df2e0e61d5b5e0b20e53 100755 (executable)
@@ -156,6 +156,8 @@ class ReleaseWriter(object):
                 # TEMPORARY HACK HACK HACK until we change the way we store the suite names etc
                 if key == 'Suite' and getattr(suite, dbfield) == 'squeeze-updates':
                     out.write("Suite: stable-updates\n")
+                elif key == 'Suite' and getattr(suite, dbfield) == 'wheezy-updates':
+                    out.write("Suite: testing-updates\n")
                 else:
                     out.write("%s: %s\n" % (key, getattr(suite, dbfield)))
 
@@ -171,9 +173,7 @@ class ReleaseWriter(object):
 
         out.write("Architectures: %s\n" % (" ".join([a.arch_string for a in architectures])))
 
-        ## FIXME: Components need to be adjusted to whatever will be in the db
-        ## Needs putting in the DB
-        components = ['main', 'contrib', 'non-free']
+        components = [ c.component_name for c in session.query(Component) ]
 
         out.write("Components: %s\n" % ( " ".join(map(lambda x: "%s%s" % (suite_suffix, x), components ))))
 
@@ -310,6 +310,7 @@ def main ():
         usage()
 
     Logger = daklog.Logger('generate-releases')
+    pool = DakProcessPool()
 
     session = DBConn().session()
 
@@ -330,8 +331,6 @@ def main ():
 
     broken=[]
 
-    pool = DakProcessPool()
-
     for s in suites:
         # Setup a multiprocessing Pool. As many workers as we have CPU cores.
         if s.untouchable and not Options["Force"]: