- print_formatted_text("no control info")
- else:
- for key in control_keys :
- output = " " + key + ": "
- if key == 'Depends':
- output += create_depends_string(depends)
- elif key == 'Recommends':
- output += create_depends_string(recommends)
- elif key == 'Section':
- output += section
- elif key == 'Architecture':
- output += arch
- elif key == 'Maintainer':
- output += maintainer
- elif key == 'Description':
- desc = control.Find(key)
- desc = re_newlinespace.sub('\n ', desc)
- output += escape_if_needed(desc)
- else:
- output += escape_if_needed(control.Find(key))
- to_print += output + '\n'
- print_formatted_text(to_print)
-
-def do_command (command, filename):
+ return formatted_text("no control info")
+ to_print = ""
+ if not package_relations.has_key(packagename):
+ package_relations[packagename] = {}
+ for key in control_keys :
+ if key == 'Depends':
+ field_value = create_depends_string(suite, depends, session)
+ package_relations[packagename][key] = field_value
+ elif key == 'Recommends':
+ field_value = create_depends_string(suite, recommends, session)
+ package_relations[packagename][key] = field_value
+ elif key == 'Section':
+ field_value = section
+ elif key == 'Architecture':
+ field_value = arch
+ elif key == 'Maintainer':
+ field_value = maintainer
+ elif key == 'Description':
+ if use_html:
+ field_value = formatted_text(control.Find(key), strip=True)
+ else:
+ desc = control.Find(key)
+ desc = re_newlinespace.sub('\n ', desc)
+ field_value = escape_if_needed(desc)
+ else:
+ field_value = escape_if_needed(control.Find(key))
+ to_print += " "+format_field(key,field_value)+'\n'
+ return to_print
+
+def do_command (command, filename, escaped=0):