Reorder redirects/release master
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 11 Aug 2008 02:31:30 +0000 (02:31 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 11 Aug 2008 02:31:30 +0000 (02:31 +0000)
apt-repository-merge

index ca064d0..1d9de0c 100644 (file)
@@ -142,23 +142,6 @@ readme.write("The first ones:\n")
 for repo in config["Repos"]:
     readme.write(" %s %s %s\n" % (repo["Base"], repo["Dist"], repo["Section"]) )
 
-
-print "Writing redirects"
-for dir, rewrites in rewrite_rules_by_dir.items():
-    outdir = "%s/%s" % (config["Output"], dir)
-    if not os.path.isdir(outdir):
-       os.makedirs(outdir)
-    htaccess = file("%s/.htaccess" % outdir,'w')
-    htaccess.write("RewriteEngine On\n")
-    readme = file("%s/README.txt" % outdir,'w')
-    readme.write("This is a directory with the following redirects set up:\n\n")
-    for filename, base in rewrites:
-       filename_escape = re.sub('\+','\\+',filename)
-       htaccess.write("RewriteRule ^(%s)$ %s/%s/$1 [R]\n" %
-               (filename_escape, base, dir) )
-       readme.write("%s -> %s/%s/%s\n" %
-               (filename, base, dir, filename) )
-
 print "Writing Release file"
 release_file = file("%s/dists/%s/Release" % (config["Output"], config["Dist"]),'w')
 release = deb822.Release()
@@ -179,3 +162,20 @@ for file_name in release_files:
            'md5sum': md5.new(f.read()).hexdigest()
        })
 release_file.write(str(release))
+
+
+print "Writing redirects"
+for dir, rewrites in rewrite_rules_by_dir.items():
+    outdir = "%s/%s" % (config["Output"], dir)
+    if not os.path.isdir(outdir):
+       os.makedirs(outdir)
+    htaccess = file("%s/.htaccess" % outdir,'w')
+    htaccess.write("RewriteEngine On\n")
+    readme = file("%s/README.txt" % outdir,'w')
+    readme.write("This is a directory with the following redirects set up:\n\n")
+    for filename, base in rewrites:
+       filename_escape = re.sub('\+','\\+',filename)
+       htaccess.write("RewriteRule ^(%s)$ %s/%s/$1 [R]\n" %
+               (filename_escape, base, dir) )
+       readme.write("%s -> %s/%s/%s\n" %
+               (filename, base, dir, filename) )