| |
@@ -153,6 +153,38 @@
|
| |
|
| |
@mock.patch('pungi.phases.createrepo.run')
|
| |
@mock.patch('pungi.phases.createrepo.CreaterepoWrapper')
|
| |
+ def test_variant_repo_rpms_without_database(self, CreaterepoWrapperCls, run):
|
| |
+ compose = DummyCompose(self.topdir, {
|
| |
+ 'createrepo_checksum': 'sha256',
|
| |
+ })
|
| |
+ compose.should_create_yum_database = False
|
| |
+ compose.DEBUG = False
|
| |
+ compose.has_comps = False
|
| |
+
|
| |
+ repo = CreaterepoWrapperCls.return_value
|
| |
+ copy_fixture('server-rpms.json', compose.paths.compose.metadata('rpms.json'))
|
| |
+
|
| |
+ create_variant_repo(compose, 'x86_64', compose.variants['Server'], 'rpm')
|
| |
+
|
| |
+ list_file = self.topdir + '/work/x86_64/repo_package_list/Server.x86_64.rpm.conf'
|
| |
+ self.assertEqual(CreaterepoWrapperCls.mock_calls[0],
|
| |
+ mock.call(createrepo_c=True))
|
| |
+ self.assertItemsEqual(
|
| |
+ repo.get_createrepo_cmd.mock_calls,
|
| |
+ [mock.call(self.topdir + '/compose/Server/x86_64/os', checksum='sha256',
|
| |
+ database=False, groupfile=None, workers=3,
|
| |
+ outputdir=self.topdir + '/compose/Server/x86_64/os',
|
| |
+ pkglist=list_file, skip_stat=True, update=True,
|
| |
+ update_md_path=self.topdir + '/work/x86_64/repo',
|
| |
+ deltas=False, oldpackagedirs=None, use_xz=False)])
|
| |
+ self.assertItemsEqual(
|
| |
+ repo.get_modifyrepo_cmd.mock_calls,
|
| |
+ [])
|
| |
+ with open(list_file) as f:
|
| |
+ self.assertEqual(f.read(), 'Packages/b/bash-4.3.30-2.fc21.x86_64.rpm\n')
|
| |
+
|
| |
+ @mock.patch('pungi.phases.createrepo.run')
|
| |
+ @mock.patch('pungi.phases.createrepo.CreaterepoWrapper')
|
| |
def test_variant_repo_source(self, CreaterepoWrapperCls, run):
|
| |
compose = DummyCompose(self.topdir, {
|
| |
'createrepo_checksum': 'sha256',
|
| |
For internal comps repos created in init phase the databases are gone for good. They are not needed there, since the repo is empty anyway. A test is added for the variant specific comps repo.
For actual shipped repos there is now a configuration option. The default depends on gather backend: for DNF composes we don't create the database (but can turn it on if wanted), for Yum composes they are created (but can be disabled).