From: James Troup Date: Fri, 7 Feb 2003 14:53:47 +0000 (+0000) Subject: per_arch_space now prints out source space use too; fix pkg-nums to work (broken... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a750a23a07830bf6541ffed883bd4d81fde551c;p=dak per_arch_space now prints out source space use too; fix pkg-nums to work (broken string.join() invocation) --- 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