]> git.decadent.org.uk Git - dak.git/blobdiff - dak/generate_releases.py
More fixes for stupid suitesuffix stuff
[dak.git] / dak / generate_releases.py
index 258677ee47d0b282c96a8d53948fc4c5824423ee..e67bd91f6d2b3e0ed0078dc93d72d1e0c51002a9 100755 (executable)
@@ -149,8 +149,9 @@ class ReleaseWriter(object):
 
         cnf = Config()
 
-        outfile = os.path.join(cnf["Dir::Root"][1:], 'dists', suite.suite_name, "Release")
-        print outfile
+        suite_suffix = "%s" % (cnf.Find("Dinstall::SuiteSuffix"))
+
+        outfile = os.path.join(cnf["Dir::Root"], 'dists', "%s/%s" % (suite.suite_name, suite_suffix), "Release")
         out = open(outfile, "w")
 
         for key, dbfield in attribs:
@@ -169,8 +170,6 @@ class ReleaseWriter(object):
 
         out.write("Architectures: %s\n" % (" ".join([a.arch_string for a in architectures])))
 
-        suite_suffix = "%s" % (cnf.Find("Dinstall::SuiteSuffix"))
-
         ## FIXME: Components need to be adjusted to whatever will be in the db
         ## Needs putting in the DB
         components = ['main', 'contrib', 'non-free']
@@ -187,7 +186,7 @@ class ReleaseWriter(object):
                 if not re_gensubrelease.match(dirpath):
                     continue
 
-                subfile = os.path.join(dirpath[1:], "Release")
+                subfile = os.path.join(dirpath, "Release")
                 subrel = open(subfile, "w")
 
                 for key, dbfield in subattribs:
@@ -205,7 +204,7 @@ class ReleaseWriter(object):
         # their checksums to the main Release file
         oldcwd = os.getcwd()
 
-        os.chdir("%sdists/%s" % (cnf["Dir::Root"], suite.suite_name))
+        os.chdir("%sdists/%s/%s" % (cnf["Dir::Root"], suite.suite_name, suite_suffix))
 
         hashfuncs = { 'MD5Sum' : apt_pkg.md5sum,
                       'SHA1' : apt_pkg.sha1sum,