gather: Fix nodeps method to not prefix match

If the input packages contain e.g. `ansible`, and there's
`ansible-runner-service` in the package set, we don't want to pull it
in.

JIRA: RHELCMP-446
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2020-04-21 09:44:27 +02:00
parent 1a5cd9e0bf
commit f7944a406e

View File

@ -79,7 +79,8 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
if isinstance(gathered_pkg, six.string_types) and not re.match( if isinstance(gathered_pkg, six.string_types) and not re.match(
gathered_pkg.replace(".", "\\.") gathered_pkg.replace(".", "\\.")
.replace("+", "\\+") .replace("+", "\\+")
.replace("*", ".*"), .replace("*", ".*")
+ "$",
pkg.name, pkg.name,
): ):
continue continue