gather: Expand wildcards in package names for nodeps

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-11-08 08:44:44 +01:00
parent fa752eb2b5
commit 7c7f997d74
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
# along with this program; if not, see <https://gnu.org/licenses/>.
from pprint import pformat
from fnmatch import fnmatch
import six
import pungi.arch
@ -63,7 +64,7 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
if not pkg_is_rpm(pkg):
continue
for gathered_pkg, pkg_arch in packages:
if isinstance(gathered_pkg, six.string_types) and pkg.name != gathered_pkg:
if isinstance(gathered_pkg, six.string_types) and not fnmatch(pkg.name, gathered_pkg):
continue
elif (type(gathered_pkg) in [SimpleRpmWrapper, RpmWrapper]
and pkg.nevra != gathered_pkg.nevra):