@@ -112,41+112,33 @@ olddeb_q = """PREPARE olddeb_q(int) as
# find me all of the contents for a given .deb
contents_q = """PREPARE contents_q(int,int,int,int) as
# find me all of the contents for a given .deb
contents_q = """PREPARE contents_q(int,int,int,int) as
- SELECT (p.path||'/'||n.file) AS fn,
+ SELECT (p.path||'/'||n.file) AS fn,
comma_separated_list(s.section||'/'||b.package)
comma_separated_list(s.section||'/'||b.package)
- FROM content_associations c
- JOIN content_file_paths p ON (c.filepath=p.id)
+ from content_associations c join content_file_paths p ON (c.filepath=p.id)
JOIN content_file_names n ON (c.filename=n.id)
JOIN binaries b ON (b.id=c.binary_pkg)
JOIN content_file_names n ON (c.filename=n.id)
JOIN binaries b ON (b.id=c.binary_pkg)
- JOIN bin_associations ba ON (b.id=ba.bin)
JOIN override o ON (o.package=b.package)
JOIN section s ON (s.id=o.section)
JOIN override o ON (o.package=b.package)
JOIN section s ON (s.id=o.section)
- WHERE (b.architecture = $1 OR b.architecture = $2)
- AND ba.suite = $3
- AND o.suite = $3
- AND b.type = 'deb'
- AND o.type = $4
+ WHERE o.suite = $1 AND o.type = $2
+ AND b.id in (SELECT ba.bin from bin_associations ba join binaries b on b.id=ba.bin where (b.architecture=$3 or b.architecture=$4)and ba.suite=$1 and b.type='deb')
GROUP BY fn
GROUP BY fn
- ORDER BY fn"""
+ ORDER BY fn;"""
+# find me all of the contents for a given .udeb
udeb_contents_q = """PREPARE udeb_contents_q(int,int,int,int,int) as
udeb_contents_q = """PREPARE udeb_contents_q(int,int,int,int,int) as
- SELECT (p.path||'/'||n.file) as fn,
+ SELECT (p.path||'/'||n.file) AS fn,
comma_separated_list(s.section||'/'||b.package)
comma_separated_list(s.section||'/'||b.package)
- FROM content_associations c
- JOIN content_file_paths p ON (c.filepath=p.id)
+ FROM content_file_paths p join content_associations c ON (c.filepath=p.id)
JOIN content_file_names n ON (c.filename=n.id)
JOIN binaries b ON (b.id=c.binary_pkg)
JOIN content_file_names n ON (c.filename=n.id)
JOIN binaries b ON (b.id=c.binary_pkg)
- JOIN bin_associations ba ON (b.id=ba.bin)
JOIN override o ON (o.package=b.package)
JOIN section s ON (s.id=o.section)
JOIN override o ON (o.package=b.package)
JOIN section s ON (s.id=o.section)
- WHERE (b.architecture = $1 OR b.architecture = $2)
- AND s.id = $3
- AND ba.suite = $4
- AND o.suite = $4
- AND b.type = 'udeb'
- AND o.type = $5
+ WHERE o.suite = $1 AND o.type = $2
+ AND s.id = $3
+ AND b.id in (SELECT ba.bin from bin_associations ba join binaries b on b.id=ba.bin where (b.architecture=$3 or b.architecture=$4)and ba.suite=$1 and b.type='udeb')
GROUP BY fn
GROUP BY fn
- ORDER BY fn"""
+ ORDER BY fn;"""
+
# clear out all of the temporarily stored content associations
# clear out all of the temporarily stored content associations