X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=madison;h=7774daec7fd450cf8838d6ac287ebb00aaf6f1b9;hb=efed042a00ba9dd5ff54fcf59773dffe0959df1b;hp=36c0e9a0a6affe5b12e76b4ce828b19bc46dbfd3;hpb=0ae0a3896e77f8e07a43d2a8b368466f4edabedd;p=dak.git diff --git a/madison b/madison index 36c0e9a0..7774daec 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.4 2001-03-20 00:28:11 troup Exp $ +# $Id: madison,v 1.5 2001-03-21 06:26:19 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 @@ -62,23 +62,26 @@ def main (): version = i[1]; architecture = i[2]; suite = i[3]; - key = (version, suite); - if not d.has_key(key): - d[key] = []; - d[key].append(architecture); + if not d.has_key(version): + d[version] = {}; + if not d[version].has_key(suite): + d[version][suite] = []; + d[version][suite].append(architecture); - keys = d.keys(); - keys.sort(); - for i in keys: - (version, suite) = i; - sys.stdout.write("%10s | %10s | %13s | " % (package, version, suite)); - count = 0; - for arch in d[i]: - if count > 0: - sys.stdout.write(', '); - sys.stdout.write(arch); - count = count + 1; - sys.stdout.write('\n'); + versions = d.keys(); + versions.sort(apt_pkg.VersionCompare); + for version in versions: + suites = d[version].keys(); + suites.sort(); + for suite in suites: + sys.stdout.write("%10s | %10s | %13s | " % (package, version, suite)); + count = 0; + for arch in d[version][suite]: + if count > 0: + sys.stdout.write(', '); + sys.stdout.write(arch); + count = count + 1; + sys.stdout.write('\n'); #######################################################################################