def METHOD_NAME(listing, prereqs, live=False):
    """Given the listing for the package manager, collect
    metadata that gets returned as a list
    The Prereqs object contains the state of the container filesystem and
    the host."""
    pkg_dict = {}
    msgs = ''
    warnings = ''
    # a valid shell needs to exist in the filesystem for this to work
    for item in command_lib.base_keys:
        # check if the supported items exist in the given listing
        if item in listing.keys():
            if live:
                items, msg = get_live_attr_list(listing[item], prereqs)
            else:
                items, msg = get_pkg_attrs(listing[item], prereqs)
            msgs = msgs + msg
            if item == 'files':
                pkg_dict.update({item: collect_file_metadata(items)})
            else:
                pkg_dict.update({item: items})
        else:
            warnings = warnings + errors.no_listing_for_base_key.format(
                listing_key=item)
    return pkg_dict, msgs, warnings