X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=saffron;h=5d497c19a5843e1b40c9de3ceabd3738516e3194;hb=9e78deadeefb78533360179077669f763f0f483c;hp=a9e759b11699aacb51ce2cb7b7d72fa4a247a373;hpb=f6386a74a3399e05382412c0eb23d9b301f6e6d4;p=dak.git diff --git a/saffron b/saffron index a9e759b1..5d497c19 100755 --- a/saffron +++ b/saffron @@ -1,8 +1,8 @@ #!/usr/bin/env python # Various statistical pr0nography fun and games -# Copyright (C) 2000, 2001, 2002 James Troup -# $Id: saffron,v 1.1 2003-01-02 18:06:19 troup Exp $ +# Copyright (C) 2000, 2001, 2002, 2003 James Troup +# $Id: saffron,v 1.2 2003-02-07 14:53:47 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 @@ -20,6 +20,17 @@ ################################################################################ +# can we change the standards instead? +# standards? +# whatever we're not conforming to +# if there's no written standard, why don't we declare linux as +# the defacto standard +# go us! + +# [aj's attempt to avoid ABI changes for released architecture(s)] + +################################################################################ + import pg, sys; import utils; import apt_pkg; @@ -54,6 +65,8 @@ SELECT a.arch_string as Architecture, sum(f.size) WHERE a.id=b.architecture AND f.id=b.file GROUP BY a.arch_string"""); print q; + q = projectB.query("SELECT sum(size) FROM files WHERE filename ~ '.(diff.gz|tar.gz|dsc)$'"); + print q; ################################################################################ @@ -104,7 +117,7 @@ def output_format(suite): output_suite = []; for word in suite.split("-"): output_suite.append(word[0]); - return output_suite.join("-"); + return "-".join(output_suite); # Obvious query with GROUP BY and mapped names -> 50 seconds # GROUP BY but ids instead of suite/architecture names -> 28 seconds