X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=madison;h=02696011f2bc1fdc5245e6fb8ba1ee9c999ad484;hb=4a37809c0bcc3a451d3d51b29e3fcc3cfe805097;hp=991a5e6460db51d067a13371edd101e686020ef1;hpb=5706849f3e5afd1bc76df4027146aab966d4c160;p=dak.git diff --git a/madison b/madison index 991a5e64..02696011 100755 --- a/madison +++ b/madison @@ -2,7 +2,7 @@ # 'Fix' stable to make debian-cd and dpkg -BORGiE users happy # Copyright (C) 2000, 2001 James Troup -# $Id: madison,v 1.6 2001-04-03 10:03:30 troup Exp $ +# $Id: madison,v 1.7 2001-06-08 00:22:10 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 @@ -36,6 +36,18 @@ projectB = None; ################################################################################ +def arch_compare (a, b): + if a == "source" and b == "source": + return 0; + elif a == "source": + return -1; + elif b == "source": + return 1; + + return cmp (a, b); + +################################################################################ + def main (): global Cnf, projectB; @@ -95,7 +107,9 @@ def main (): for suite in suites: sys.stdout.write("%10s | %10s | %13s | " % (package, version, suite)); count = 0; - for arch in d[version][suite]: + arches = d[version][suite]; + arches.sort(arch_compare); + for arch in arches: if count > 0: sys.stdout.write(', '); sys.stdout.write(arch);