]> git.decadent.org.uk Git - dak.git/blobdiff - jenna
Updates to sync partially with reality; still much to do though.
[dak.git] / jenna
diff --git a/jenna b/jenna
index b186ff7898a31e880da8136b0ef4a5f43516ba63..d84ffb29726d95328a4fe6290a28e2a504c88bc3 100755 (executable)
--- a/jenna
+++ b/jenna
@@ -2,7 +2,7 @@
 
 # Generate file list which is then fed to apt-ftparchive to generate Packages and Sources files
 # Copyright (C) 2000  James Troup <james@nocrew.org>
-# $Id: jenna,v 1.2 2000-12-05 04:27:48 troup Exp $
+# $Id: jenna,v 1.4 2001-01-25 06:00:07 troup Exp $
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,10 +39,10 @@ def generate_src_list(suite, component, output, dislocated_files):
     suite_id = db_access.get_suite_id(suite);
     
     if component == "-":
-        q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id, f.id FROM source s, src_associations sa, location l, files f WHERE sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id"
+        q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id, f.id FROM source s, src_associations sa, location l, files f WHERE sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id ORDER BY s.source, s.version"
                            % (suite_id));
     else:
-        q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id, f.id FROM source s, src_associations sa, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id"
+        q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id, f.id FROM source s, src_associations sa, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id ORDER BY s.source, s.version"
                            % (component, suite_id));
     entries = q.getresult();
     for entry in entries:
@@ -90,9 +90,9 @@ def generate_bin_list(suite, component, architecture, output, type, dislocated_f
     suite_id = db_access.get_suite_id(suite);
     
     if component == "-":
-        q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id, f.id FROM architecture a, binaries b, bin_associations ba, location l, files f WHERE ( a.arch_string = '%s' OR a.arch_string = 'all' ) AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s'" % (architecture, suite_id, type));
+        q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id, f.id FROM architecture a, binaries b, bin_associations ba, location l, files f WHERE ( a.arch_string = '%s' OR a.arch_string = 'all' ) AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s' ORDER BY b.package, b.version, a.arch_string" % (architecture, suite_id, type));
     else:
-        q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id, f.id FROM architecture a, binaries b, bin_associations ba, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND (a.arch_string = '%s' OR a.arch_string = 'all') AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s'" % (component, architecture, suite_id, type));
+        q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id, f.id FROM architecture a, binaries b, bin_associations ba, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND (a.arch_string = '%s' OR a.arch_string = 'all') AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s' ORDER BY b.package, b.version, a.arch_string" % (component, architecture, suite_id, type));
     entries = q.getresult();
     for entry in entries:
         package = entry[0]
@@ -104,12 +104,6 @@ def generate_bin_list(suite, component, architecture, output, type, dislocated_f
         if dislocated_files.has_key(file_id):
             filename = dislocated_files[file_id];
         
-        # Hack to handle screwed up sid distro [FIXME: this may have issues, remove ASAP]
-        if not os.path.exists(filename):
-            sid_filename = string.replace(filename, "/woody/", "/potato/");
-            if os.path.exists(sid_filename):
-                filename = sid_filename;
-                
         if os.path.exists(filename):
             if packages.has_key(package):
                 if apt_pkg.VersionCompare(packages[package]["version"], version) == -1: