Fix handling globs in input packages
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
a9415eb0e5
commit
d4f8e32a80
@ -340,11 +340,20 @@ class Gather(GatherBase):
|
||||
else:
|
||||
pkgs = self.q_binary_packages.filter(name__glob=pattern).apply()
|
||||
|
||||
pkgs = self._get_best_package(pkgs)
|
||||
if not pkgs:
|
||||
self.logger.error("No package matches pattern %s" % pattern)
|
||||
|
||||
# The pattern could have been a glob. In that case we want to
|
||||
# group the packages by name and get best match in those
|
||||
# smaller groups.
|
||||
packages_by_name = {}
|
||||
for po in pkgs:
|
||||
packages_by_name.setdefault(po.name, []).append(po)
|
||||
|
||||
for name, packages in packages_by_name.iteritems():
|
||||
pkgs = self._get_best_package(packages)
|
||||
if pkgs:
|
||||
added.update(pkgs)
|
||||
else:
|
||||
self.logger.error("No package matches pattern %s" % pattern)
|
||||
|
||||
for pkg in added:
|
||||
self._set_flag(pkg, PkgFlag.input)
|
||||
|
@ -1717,10 +1717,6 @@ class DNFDepsolvingTestCase(DepsolvingBase, unittest.TestCase):
|
||||
def test_multilib_exclude_pattern_does_not_match_noarch(self):
|
||||
pass
|
||||
|
||||
@unittest.skip('Not implemented yet')
|
||||
def test_input_by_wildcard(self):
|
||||
pass
|
||||
|
||||
def test_firefox_selfhosting_with_krb5_lookaside(self):
|
||||
super(DNFDepsolvingTestCase, self).test_firefox_selfhosting_with_krb5_lookaside()
|
||||
self.assertFlags("dummy-krb5-1.10-5.x86_64", [PkgFlag.lookaside])
|
||||
|
Loading…
Reference in New Issue
Block a user