gather: nodeps should take packages from comps groups
When gather_method is set to nodeps, we should not ignore the comps group that the method received. Instead it should find out which packages are in those groups and take them into the compose. In order for this to be of any reasonable use, the comps file needs to include all dependencies for the packages. Fixes: #653 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
0350b715dd
commit
8c48dfb93a
4 changed files with 67 additions and 1 deletions
26
tests/test_gather_method_nodeps.py
Normal file
26
tests/test_gather_method_nodeps.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import mock
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
||||
|
||||
from pungi.phases.gather.methods import method_nodeps as nodeps
|
||||
from tests import helpers
|
||||
|
||||
COMPS_FILE = os.path.join(helpers.FIXTURE_DIR, 'comps.xml')
|
||||
|
||||
|
||||
class TestWritePungiConfig(helpers.PungiTestCase):
|
||||
def setUp(self):
|
||||
super(TestWritePungiConfig, self).setUp()
|
||||
self.compose = helpers.DummyCompose(self.topdir, {})
|
||||
self.compose.DEBUG = False
|
||||
self.compose.paths.work.comps = mock.Mock(return_value=COMPS_FILE)
|
||||
|
||||
def test_expand_group(self):
|
||||
packages = nodeps.expand_groups(self.compose, 'x86_64', ['core', 'text-internet'])
|
||||
self.assertItemsEqual(packages, [('dummy-bash', 'x86_64'),
|
||||
('dummy-elinks', 'x86_64'),
|
||||
('dummy-tftp', 'x86_64')])
|
||||
Loading…
Add table
Add a link
Reference in a new issue