Remove unused patches
This commit is contained in:
parent
45b19f77b9
commit
f33fb68c9a
42
1310.patch
42
1310.patch
@ -1,42 +0,0 @@
|
|||||||
From e721c05849351762b912dca395655f75393b8cea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomír Sedlář <lsedlar@redhat.com>
|
|
||||||
Date: Dec 05 2019 13:28:34 +0000
|
|
||||||
Subject: Avoid crash if a module is not available on all arches
|
|
||||||
|
|
||||||
|
|
||||||
Theoretically it is possible, and this is the bare minimum of changes
|
|
||||||
needed to survive such situation. There may be other pitfalls.
|
|
||||||
|
|
||||||
Fixes: https://pagure.io/pungi/issue/1309
|
|
||||||
JIRA: COMPOSE-4016
|
|
||||||
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/pungi/phases/createrepo.py b/pungi/phases/createrepo.py
|
|
||||||
index e0a1da9..852af01 100644
|
|
||||||
--- a/pungi/phases/createrepo.py
|
|
||||||
+++ b/pungi/phases/createrepo.py
|
|
||||||
@@ -198,7 +198,7 @@ def create_variant_repo(compose, arch, variant, pkg_type, pkgset, modules_metada
|
|
||||||
mod_index = Modulemd.ModuleIndex()
|
|
||||||
metadata = []
|
|
||||||
|
|
||||||
- for module_id, mmd in variant.arch_mmds[arch].items():
|
|
||||||
+ for module_id, mmd in variant.arch_mmds.get(arch, {}).items():
|
|
||||||
if modules_metadata:
|
|
||||||
module_rpms = mmd.get_rpm_artifacts()
|
|
||||||
metadata.append((module_id, module_rpms))
|
|
||||||
diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py
|
|
||||||
index 8e5de32..b2ef7ad 100644
|
|
||||||
--- a/pungi/phases/gather/sources/source_module.py
|
|
||||||
+++ b/pungi/phases/gather/sources/source_module.py
|
|
||||||
@@ -38,7 +38,7 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
|
||||||
|
|
||||||
compatible_arches = pungi.arch.get_compatible_arches(arch, multilib=True)
|
|
||||||
|
|
||||||
- for nsvc, module_stream in variant.arch_mmds[arch].items():
|
|
||||||
+ for nsvc, module_stream in variant.arch_mmds.get(arch, {}).items():
|
|
||||||
available_rpms = sum(
|
|
||||||
(
|
|
||||||
variant.nsvc_to_pkgset[nsvc].rpms_by_arch.get(a, [])
|
|
||||||
|
|
26
1311.patch
26
1311.patch
@ -1,26 +0,0 @@
|
|||||||
From 0f53506765d035d760ebe0961957623370d61a34 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomír Sedlář <lsedlar@redhat.com>
|
|
||||||
Date: Dec 06 2019 08:49:01 +0000
|
|
||||||
Subject: Add version constraint to productmd dependency
|
|
||||||
|
|
||||||
|
|
||||||
This should be propagated to RPM level with F30+.
|
|
||||||
|
|
||||||
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 79e56a9..bbabc40 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -61,7 +61,7 @@ setup(
|
|
||||||
"jsonschema",
|
|
||||||
"kobo",
|
|
||||||
"lxml",
|
|
||||||
- "productmd",
|
|
||||||
+ "productmd>=1.23",
|
|
||||||
"six",
|
|
||||||
'dogpile.cache',
|
|
||||||
],
|
|
||||||
|
|
126
1319.patch
126
1319.patch
@ -1,126 +0,0 @@
|
|||||||
From b415e31f9de7f813756efa1d152c8c3119383b5f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Haibo Lin <hlin@redhat.com>
|
|
||||||
Date: Jan 02 2020 13:13:14 +0000
|
|
||||||
Subject: ostree: Fix arg passed to scm.get_dir_from_scm
|
|
||||||
|
|
||||||
|
|
||||||
A compose object should be passed instead of logger.
|
|
||||||
|
|
||||||
JIRA: COMPOSE-4050
|
|
||||||
Signed-off-by: Haibo Lin <hlin@redhat.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/pungi/phases/ostree.py b/pungi/phases/ostree.py
|
|
||||||
index 657260c..9761d98 100644
|
|
||||||
--- a/pungi/phases/ostree.py
|
|
||||||
+++ b/pungi/phases/ostree.py
|
|
||||||
@@ -72,7 +72,7 @@ class OSTreeThread(WorkerThread):
|
|
||||||
self.logdir = compose.paths.log.topdir('%s/%s/ostree-%d' %
|
|
||||||
(arch, variant.uid, self.num))
|
|
||||||
repodir = os.path.join(workdir, 'config_repo')
|
|
||||||
- self._clone_repo(repodir, config['config_url'], config.get('config_branch', 'master'))
|
|
||||||
+ self._clone_repo(compose, repodir, config['config_url'], config.get('config_branch', 'master'))
|
|
||||||
|
|
||||||
comps_repo = compose.paths.work.comps_repo('$basearch', variant=variant, create_dir=False)
|
|
||||||
repos = shortcuts.force_list(config['repo']) + self.repos
|
|
||||||
@@ -168,6 +168,6 @@ class OSTreeThread(WorkerThread):
|
|
||||||
mounts=mounts, new_chroot=True,
|
|
||||||
weight=compose.conf['runroot_weights'].get('ostree'))
|
|
||||||
|
|
||||||
- def _clone_repo(self, repodir, url, branch):
|
|
||||||
+ def _clone_repo(self, compose, repodir, url, branch):
|
|
||||||
scm.get_dir_from_scm({'scm': 'git', 'repo': url, 'branch': branch, 'dir': '.'},
|
|
||||||
- repodir, logger=self.pool._logger)
|
|
||||||
+ repodir, compose=compose)
|
|
||||||
diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py
|
|
||||||
index 46c774b..c69b60a 100644
|
|
||||||
--- a/pungi/phases/ostree_installer.py
|
|
||||||
+++ b/pungi/phases/ostree_installer.py
|
|
||||||
@@ -97,7 +97,7 @@ class OstreeInstallerThread(WorkerThread):
|
|
||||||
util.makedirs(os.path.dirname(output_dir))
|
|
||||||
|
|
||||||
self.template_dir = os.path.join(compose.paths.work.topdir(arch), variant.uid, 'lorax_templates')
|
|
||||||
- self._clone_templates(config.get('template_repo'), config.get('template_branch'))
|
|
||||||
+ self._clone_templates(compose, config.get('template_repo'), config.get('template_branch'))
|
|
||||||
disc_type = compose.conf['disc_types'].get('ostree', 'ostree')
|
|
||||||
|
|
||||||
volid = get_volid(compose, arch, variant, disc_type=disc_type)
|
|
||||||
@@ -108,12 +108,12 @@ class OstreeInstallerThread(WorkerThread):
|
|
||||||
self._add_to_manifest(compose, variant, arch, filename)
|
|
||||||
self.pool.log_info('[DONE ] %s' % (msg))
|
|
||||||
|
|
||||||
- def _clone_templates(self, url, branch='master'):
|
|
||||||
+ def _clone_templates(self, compose, url, branch='master'):
|
|
||||||
if not url:
|
|
||||||
self.template_dir = None
|
|
||||||
return
|
|
||||||
scm.get_dir_from_scm({'scm': 'git', 'repo': url, 'branch': branch, 'dir': '.'},
|
|
||||||
- self.template_dir, logger=self.pool._logger)
|
|
||||||
+ self.template_dir, compose=compose)
|
|
||||||
|
|
||||||
def _get_release(self, compose, config):
|
|
||||||
if 'release' in config:
|
|
||||||
diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py
|
|
||||||
index 40ab9fc..cb0fbca 100644
|
|
||||||
--- a/tests/test_ostree_installer_phase.py
|
|
||||||
+++ b/tests/test_ostree_installer_phase.py
|
|
||||||
@@ -437,7 +437,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|
||||||
self.assertEqual(get_dir_from_scm.call_args_list,
|
|
||||||
[mock.call({'scm': 'git', 'repo': 'git://example.com/templates.git',
|
|
||||||
'branch': 'f24', 'dir': '.'},
|
|
||||||
- templ_dir, logger=pool._logger)])
|
|
||||||
+ templ_dir, compose=self.compose)])
|
|
||||||
self.assertRunrootCall(koji,
|
|
||||||
["http://example.com/repo/1",
|
|
||||||
'http://example.com/work/$basearch/comps_repo_Everything'],
|
|
||||||
diff --git a/tests/test_ostree_phase.py b/tests/test_ostree_phase.py
|
|
||||||
index b782ace..05b5913 100644
|
|
||||||
--- a/tests/test_ostree_phase.py
|
|
||||||
+++ b/tests/test_ostree_phase.py
|
|
||||||
@@ -130,7 +130,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|
||||||
})
|
|
||||||
self.pool = mock.Mock()
|
|
||||||
|
|
||||||
- def _dummy_config_repo(self, scm_dict, target, logger=None):
|
|
||||||
+ def _dummy_config_repo(self, scm_dict, target, compose=None):
|
|
||||||
os.makedirs(target)
|
|
||||||
helpers.touch(os.path.join(target, 'fedora-atomic-docker-host.json'),
|
|
||||||
json.dumps({'ref': 'fedora-atomic/25/x86_64',
|
|
||||||
@@ -202,7 +202,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|
||||||
self.assertEqual(get_dir_from_scm.call_args_list,
|
|
||||||
[mock.call({'scm': 'git', 'repo': 'https://git.fedorahosted.org/git/fedora-atomic.git',
|
|
||||||
'branch': 'f24', 'dir': '.'},
|
|
||||||
- self.topdir + '/work/ostree-1/config_repo', logger=self.pool._logger)])
|
|
||||||
+ self.topdir + '/work/ostree-1/config_repo', compose=self.compose)])
|
|
||||||
self.assertEqual(koji.get_runroot_cmd.call_args_list,
|
|
||||||
[mock.call('rrt', 'x86_64',
|
|
||||||
['pungi-make-ostree',
|
|
||||||
@@ -371,7 +371,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|
||||||
self.assertEqual(get_dir_from_scm.call_args_list,
|
|
||||||
[mock.call({'scm': 'git', 'repo': 'https://git.fedorahosted.org/git/fedora-atomic.git',
|
|
||||||
'branch': 'f24', 'dir': '.'},
|
|
||||||
- self.topdir + '/work/ostree-1/config_repo', logger=self.pool._logger)])
|
|
||||||
+ self.topdir + '/work/ostree-1/config_repo', compose=self.compose)])
|
|
||||||
self.assertEqual(koji.get_runroot_cmd.call_args_list,
|
|
||||||
[mock.call('rrt', 'x86_64',
|
|
||||||
['pungi-make-ostree',
|
|
||||||
@@ -406,7 +406,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|
||||||
self.assertEqual(get_dir_from_scm.call_args_list,
|
|
||||||
[mock.call({'scm': 'git', 'repo': 'https://git.fedorahosted.org/git/fedora-atomic.git',
|
|
||||||
'branch': 'f24', 'dir': '.'},
|
|
||||||
- self.topdir + '/work/ostree-1/config_repo', logger=self.pool._logger)])
|
|
||||||
+ self.topdir + '/work/ostree-1/config_repo', compose=self.compose)])
|
|
||||||
self.assertEqual(koji.get_runroot_cmd.call_args_list,
|
|
||||||
[mock.call('rrt', 'x86_64',
|
|
||||||
['pungi-make-ostree',
|
|
||||||
@@ -441,7 +441,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
|
||||||
self.assertEqual(get_dir_from_scm.call_args_list,
|
|
||||||
[mock.call({'scm': 'git', 'repo': 'https://git.fedorahosted.org/git/fedora-atomic.git',
|
|
||||||
'branch': 'f24', 'dir': '.'},
|
|
||||||
- self.topdir + '/work/ostree-1/config_repo', logger=self.pool._logger)])
|
|
||||||
+ self.topdir + '/work/ostree-1/config_repo', compose=self.compose)])
|
|
||||||
self.assertEqual(koji.get_runroot_cmd.call_args_list,
|
|
||||||
[mock.call('rrt', 'x86_64',
|
|
||||||
['pungi-make-ostree',
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user