##### SUMMARY
Happened here: https://github.com/ansible-collections/community.general/pull/341

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
ansible-test

##### ANSIBLE VERSION
```paste below
devel
```

# No
    # ma
    # ma
    # (S
    #
    # We 
    # a 
    # ht
    new_pkgspec = []
    if pkgspec:
        for pkgspec_pattern in pkgspec:
            pkgname_pattern, version = package_split(pkgspec_pattern)
            # no
            if frozenset('*?[]!').intersection(pkgname_pattern):
                # ha
                # on
                if ":" not in pkgname_pattern:
                    # Fi
                    try:
                        pkg_name_cache = _non_multiarch
                    except NameError:
                        pkg_name_cache = _non_multiarch = [pkg.name for pkg in cache if ':' not in pkg.name]  # no
                else:
                    # Cr
                    try:
                        pkg_name_cache = _all_pkg_names
                    except NameError:
                        pkg_name_cache = _all_pkg_names = [pkg.name for pkg in cache]  # no