3 # Dump variables from a .katie file to stdout
4 # Copyright (C) 2001, 2002 James Troup <james@nocrew.org>
5 # $Id: ashley,v 1.6 2002-08-07 17:19:29 troup Exp $
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ################################################################################
23 # <elmo> ooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhh dddddddddeeeeeeeaaaaaaaarrrrrrrrrrr
24 # <elmo> iiiiiiiiiiiii tttttttttthhhhhhhhiiiiiiiiiiiinnnnnnnnnkkkkkkkkkkkkk iiiiiiiiiiiiii mmmmmmmmmmiiiiiiiisssssssssssssssseeeeeeeddd uuuupppppppppppp ttttttttthhhhhhhheeeeeeee xxxxxxxssssssseeeeeeeeettttttttttttt aaaaaaaarrrrrrrggggggsssssssss
26 # ['xset r rate 30 250' bad, mmkay]
28 ################################################################################
34 Cnf = utils.get_conf()
36 for arg in sys.argv[1:]:
37 arg = utils.validate_changes_file_arg(arg);
38 k.pkg.changes_file = arg;
43 changes = k.pkg.changes;
45 # Mandatory changes fields
46 for i in [ "source", "version", "maintainer", "urgency", "changedby822", "changedbyname", "maintainername", "maintaineremail", "fingerprint" ]:
47 print " %s: %s" % (string.capitalize(i), changes[i]);
49 # Mandatory changes lists
50 for i in [ "distribution", "architecture", "closes" ]:
51 print " %s: %s" % (string.capitalize(i), string.join(changes[i].keys()));
53 # Optional changes fields
54 for i in [ "changed-by", "maintainer822", "filecontents", "format" ]:
55 if changes.has_key(i):
56 print " %s: %s" % (string.capitalize(i), changes[i]);
60 utils.warn("changes still has following unrecognised keys: %s" % (changes.keys()));
64 for i in [ "source", "version", "maintainer", "fingerprint", "uploaders" ]:
66 print " %s: %s" % (string.capitalize(i), dsc[i]);
70 utils.warn("dsc still has following unrecognised keys: %s" % (dsc.keys()));
74 for file in files.keys():
75 print " %s:" % (file);
76 for i in [ "package", "version", "architecture", "type", "size",
77 "md5sum", "component", "location id", "source package",
78 "source version", "maintainer", "dbtype", "files id",
79 "new", "section", "priority" ]:
80 if files[file].has_key(i):
81 print " %s: %s" % (string.capitalize(i), files[file][i]);
84 utils.warn("files[%s] still has following unrecognised keys: %s" % (file, files[file].keys()));
87 dsc_files = k.pkg.dsc_files;
89 for file in dsc_files.keys():
90 print " %s:" % (file);
92 for i in [ "size", "md5sum" ]:
93 print " %s: %s" % (string.capitalize(i), dsc_files[file][i]);
94 del dsc_files[file][i];
96 for i in [ "files id" ]:
97 if dsc_files[file].has_key(i):
98 print " %s: %s" % (string.capitalize(i), dsc_files[file][i]);
99 del dsc_files[file][i];
101 utils.warn("dsc_files[%s] still has following unrecognised keys: %s" % (file, dsc_files[file].keys()));
104 if __name__ == '__main__':