List the files that belong to a package. Not specifying any packages will
    return a list of _every_ file on the system's rpm database (not generally
    recommended).

    root
        use root as top level directory (default: "/")

    CLI Examples:

    .. code-block:: bash

        salt '*' lowpkg.file_list httpd
        salt '*' lowpkg.file_list httpd postfix
        salt '*' lowpkg.file_list

def file_list(*packages, **kwargs):
    '''
    List the files that belong to a package. Not specifying any packages will
    return a list of _every_ file on the system's rpm database (not generally
    recommended).

    root
        use root as top level directory (default: "/")

    CLI Examples:

    .. code-block:: bash

        salt '*' lowpkg.file_list httpd
        salt '*' lowpkg.file_list httpd postfix
        salt '*' lowpkg.file_list
    '''
    cmd = ['rpm']
    if kwargs.get('root'):
        cmd.extend(['--root', kwargs['root']])

    cmd.append('-ql' if packages else '-qla')
    if packages:
        # Can't concatenate a tuple, must do a list.extend()
        cmd.extend(packages)

    ret = __salt__['cmd.run'](
        cmd,
        output_loglevel='trace',
        python_shell=False).splitlines()
    return {'errors': [], 'files': ret}