Filter source packages

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-01-13 09:40:11 +01:00
parent 5ef630d6d4
commit 0a44b2fd07
2 changed files with 4 additions and 5 deletions

View File

@ -298,9 +298,11 @@ class Gather(GatherBase):
exclude = set()
for pattern in excludes:
with Profiler("Gather.add_initial_packages():exclude"):
# TODO: debug, source
# TODO: debug
if pattern.endswith(".+"):
pkgs = self.q_multilib_binary_packages.filter(name__glob=pattern[:-2])
elif pattern.endswith(".src"):
pkgs = self.q_source_packages.filter(name__glob=pattern[:-4])
else:
pkgs = self.q_binary_packages.filter(name__glob=pattern)
@ -313,6 +315,7 @@ class Gather(GatherBase):
self.q_native_binary_packages = self.q_native_binary_packages.filter(pkg__neq=exclude).apply()
self.q_multilib_binary_packages = self.q_multilib_binary_packages.filter(pkg__neq=exclude).apply()
self.q_noarch_binary_packages = self.q_noarch_binary_packages.filter(pkg__neq=exclude).apply()
self.q_source_packages = self.q_source_packages.filter(pkg__neq=exclude).apply()
self.init_query_cache()

View File

@ -1724,10 +1724,6 @@ class DNFDepsolvingTestCase(DepsolvingBase, unittest.TestCase):
def test_kernel_fulltree_excludes(self):
pass
@unittest.skip('Not implemented yet')
def test_bash_multilib_exclude_source(self):
pass
if __name__ == "__main__":
unittest.main()