def Archive(fileObj):
    fileObj.seek(0, 2)
    length = fileObj.tell()
    fileObj.seek(0)
    magic = fileObj.read(8)
    if len(magic) < 8 or magic != '!<arch>\n':
        raise ArchiveError('Unrecognized format')
    pFileObj = util.ExtendedFdopen(os.dup(fileObj.fileno()))
    longNameData = None

    while fileObj.tell() <= (length-1):
        hdr = fileObj.read(60)
        if len(hdr) < 60 or hdr[58:60] != '`\n':
            raise ArchiveError('Unrecognized header')
        size = int(hdr[48:58])
        name = hdr[0:16].strip()
        start = fileObj.tell()
        data = util.SeekableNestedFile(pFileObj, size, start)
        fileObj.seek(size + size%2, 1) # padded to even size

        if name == '//' and longNameData is None:
            # GNU extended name data block
            longNameData = data.read()
            continue

        if name.startswith('/') and len(name) > 1 and longNameData is not None:
            # reference into data block
            nameIndex = int(name[1:])
            nameEndIndex = longNameData[nameIndex:].index('\n')
            name = longNameData[nameIndex:nameIndex+nameEndIndex].rstrip('/')

        if '/' in name and len(name) > 1:
            # GNU adds trailing / to names; '/' is the name of ranlib table
            name = name.rstrip('/')

        yield ArFile(
            name = name,
            mtime = int(hdr[16:28]),
            uid = int(hdr[28:34]),
            gid = int(hdr[34:40]),
            mode = int(hdr[40:48], 8),
            size = size,
            data = data)
Fetch product details, if we don't already have them.
dataset/ETHPy150Open sassoftware/conary/conary/lib/ar.py/Archive--crossover with--dataset/ETHPy150Open mozilla/addons-server/src/olympia/core/apps.py/CoreConfig.load_product_details