]> git.donarmstrong.com Git - wannabuild.git/commitdiff
output number of needs-build packages as well
authorAndreas Barth <aba@not.so.argh.org>
Sun, 13 Mar 2011 13:32:37 +0000 (13:32 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sun, 13 Mar 2011 13:32:37 +0000 (13:32 +0000)
schema/wanna-build.sql

index 574673217327a77656c664d5de8f24ab00b8c29a..5bd6711c426d2157267331ae85021635d462ead0 100644 (file)
@@ -2639,7 +2639,36 @@ SET search_path = public, pg_catalog;
 --
 
 CREATE VIEW distribution_architectures AS
-    (((((((((((((SELECT DISTINCT packages.distribution, 'alpha'::character varying AS architecture FROM alpha.packages UNION SELECT DISTINCT packages.distribution, 'amd64'::character varying AS architecture FROM amd64.packages) UNION SELECT DISTINCT packages.distribution, 'arm'::character varying AS architecture FROM arm.packages) UNION SELECT DISTINCT packages.distribution, 'armel'::character varying AS architecture FROM armel.packages) UNION SELECT DISTINCT packages.distribution, 'hppa'::character varying AS architecture FROM hppa.packages) UNION SELECT DISTINCT packages.distribution, 'hurd-i386'::character varying AS architecture FROM "hurd-i386".packages) UNION SELECT DISTINCT packages.distribution, 'i386'::character varying AS architecture FROM i386.packages) UNION SELECT DISTINCT packages.distribution, 'ia64'::character varying AS architecture FROM ia64.packages) UNION SELECT DISTINCT packages.distribution, 'kfreebsd-amd64'::character varying AS architecture FROM "kfreebsd-amd64".packages) UNION SELECT DISTINCT packages.distribution, 'kfreebsd-i386'::character varying AS architecture FROM "kfreebsd-i386".packages) UNION SELECT DISTINCT packages.distribution, 'mips'::character varying AS architecture FROM mips.packages) UNION SELECT DISTINCT packages.distribution, 'mipsel'::character varying AS architecture FROM mipsel.packages) UNION SELECT DISTINCT packages.distribution, 'powerpc'::character varying AS architecture FROM powerpc.packages) UNION SELECT DISTINCT packages.distribution, 's390'::character varying AS architecture FROM s390.packages) UNION SELECT DISTINCT packages.distribution, 'sparc'::character varying AS architecture FROM sparc.packages;
+    (((((((((((((
+        SELECT DISTINCT packages.distribution, 'alpha'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM alpha.packages 
+          UNION 
+        SELECT DISTINCT packages.distribution, 'amd64'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM amd64.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'arm'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM arm.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'armel'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM armel.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'hppa'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM hppa.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'hurd-i386'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM "hurd-i386".packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'i386'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM i386.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'ia64'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM ia64.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'kfreebsd-amd64'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM "kfreebsd-amd64".packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'kfreebsd-i386'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM "kfreebsd-i386".packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'mips'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM mips.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'mipsel'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM mipsel.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'powerpc'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM powerpc.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 's390'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM s390.packages
+          ) UNION
+         SELECT DISTINCT packages.distribution, 'sparc'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM sparc.packages;
 
 
 ALTER TABLE public.distribution_architectures OWNER TO wbadm;