Retrieve the list of packages where the specified user some acl.

    :arg config: a dict containing the fedmsg config
    :arg username: the fas username of the packager whose packages are of
        interest.
    :return: a set listing all the packages where the specified user has
        some ACL.

def get_packages_of_user(config, username, flags):
    """ Retrieve the list of packages where the specified user some acl.

    :arg config: a dict containing the fedmsg config
    :arg username: the fas username of the packager whose packages are of
        interest.
    :return: a set listing all the packages where the specified user has
        some ACL.

    """

    if not _cache.is_configured:
        _cache.configure(**config['fmn.rules.cache'])

    packages = []

    groups = get_groups_of_user(config, get_fas(config), username)
    owners = [username] + ['group::' + group for group in groups]

    for owner in owners:
        key = cache_key_generator(get_packages_of_user, owner)
        creator = lambda: _get_pkgdb2_packages_for(config, owner, flags)
        subset = _cache.get_or_create(key, creator)
        packages.extend(subset)

    return set(packages)