def do_list(marfile, detailed=False):
with open(marfile, '<STR_LIT:rb>') as f:<EOL><INDENT>with MarReader(f) as m:<EOL><INDENT>if detailed:<EOL><INDENT>if m.compression_type:<EOL><INDENT>yield "<STR_LIT>".format(m.compression_type)<EOL><DEDENT>if m.signature_type:<EOL><INDENT>yield "<STR_LIT>".format(m.signature_type)<EOL><DEDENT>if m.mardata.signatures:<EOL><INDENT>plural = "<STR_LIT:s>" if (m.mardata.signatures.count == <NUM_LIT:0> or m.mardata.signatures.count > <NUM_LIT:1>) else "<STR_LIT>"<EOL>yield "<STR_LIT>".format(m.mardata.signatures.count, plural)<EOL>for s in m.mardata.signatures.sigs:<EOL><INDENT>yield "<STR_LIT>".format(s.algorithm_id, s.size)<EOL><DEDENT>yield "<STR_LIT>"<EOL><DEDENT>if m.mardata.additional:<EOL><INDENT>yield "<STR_LIT>".format(len(m.mardata.additional.sections))<EOL>for s in m.mardata.additional.sections:<EOL><INDENT>if s.id == <NUM_LIT:1>:<EOL><INDENT>yield ("<STR_LIT>")<EOL>yield ("<STR_LIT>".format(s.channel))<EOL>yield ("<STR_LIT>".format(s.productversion))<EOL>yield "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>yield ("<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT><DEDENT>yield ("<STR_LIT>".format("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"))<EOL>for e in m.mardata.index.entries:<EOL><INDENT>yield ("<STR_LIT>".format(e.size, e.flags, e.name))<EOL><DEDENT><DEDENT><DEDENT>
List the MAR file.

Yields lines of text to output