| |
@@ -1211,7 +1211,8 @@
|
| |
# Now assemble into a yum repo:
|
| |
for pkg in self.rpmBuilds:
|
| |
for arch in arches:
|
| |
- check_call(['cp', pkg.get_built_rpm(arch), self.repoDir])
|
| |
+ for subpackage in pkg.get_subpackage_names():
|
| |
+ shutil.copy(pkg.get_built_rpm(arch, name=subpackage), self.repoDir)
|
| |
|
| |
check_call(["createrepo_c", self.repoDir])
|
| |
|
| |
@@ -1827,6 +1828,22 @@
|
| |
for pkg in repo.rpmBuilds:
|
| |
shutil.rmtree(pkg.get_base_dir())
|
| |
|
| |
+ @unittest.skipIf(not shutil.which('createrepo_c'), 'createrepo_c not found in PATH')
|
| |
+ def test_includes_subpackages(self):
|
| |
+ package = SimpleRpmBuild('test-package', '0.1', '1')
|
| |
+ package.add_devel_subpackage()
|
| |
+ package.add_subpackage('python')
|
| |
+ repo = YumRepoBuild([package])
|
| |
+ self.addCleanup(shutil.rmtree, package.get_base_dir())
|
| |
+ self.addCleanup(shutil.rmtree, repo.repoDir)
|
| |
+
|
| |
+ repo.make(expectedArch)
|
| |
+
|
| |
+ self.assert_is_dir(os.path.join(repo.repoDir, 'repodata'))
|
| |
+ self.assert_is_file(os.path.join(repo.repoDir, 'test-package-0.1-1.%s.rpm' % expectedArch))
|
| |
+ self.assert_is_file(os.path.join(repo.repoDir, 'test-package-devel-0.1-1.%s.rpm' % expectedArch))
|
| |
+ self.assert_is_file(os.path.join(repo.repoDir, 'test-package-python-0.1-1.%s.rpm' % expectedArch))
|
| |
+
|
| |
@unittest.skipIf(expectedArch != 'x86_64' or not shutil.which("createrepo_c"),
|
| |
'host arch is not x86_64 or createrepo_c not found in PATH')
|
| |
def test_multiple_arches(self):
|
| |