Get all info brew can provide about a list of packages.

    Does not do any kind of processing, so the format depends entirely on
    the output brew gives. This may change if a new version of the format is
    requested.

    On failure, returns an empty dict and logs failure.
    On success, returns a dict mapping each item in pkgs to its corresponding
    object in the output of 'brew info'.

    Caveat: If one of the packages does not exist, no packages will be
            included in the output.

def _info(*pkgs):
    '''
    Get all info brew can provide about a list of packages.

    Does not do any kind of processing, so the format depends entirely on
    the output brew gives. This may change if a new version of the format is
    requested.

    On failure, returns an empty dict and logs failure.
    On success, returns a dict mapping each item in pkgs to its corresponding
    object in the output of 'brew info'.

    Caveat: If one of the packages does not exist, no packages will be
            included in the output.
    '''
    cmd = 'info --json=v1 {0}'.format(' '.join(pkgs))
    brew_result = _call_brew(cmd)
    if brew_result['retcode']:
        log.error('Failed to get info about packages: %s',
                  ' '.join(pkgs))
        return {}
    output = salt.utils.json.loads(brew_result['stdout'])
    return dict(zip(pkgs, output))