|
|
837927e |
From aba277baf04346ea21d22adbeb97ab62d9a49c65 Mon Sep 17 00:00:00 2001
|
|
|
837927e |
From: Martin Kutlak <mkutlak@redhat.com>
|
|
|
837927e |
Date: Fri, 1 Nov 2019 15:04:59 +0100
|
|
|
837927e |
Subject: [PATCH] retrace_worker: Remove distro hack from mock config
|
|
|
837927e |
|
|
|
837927e |
Introduced in 5a1e21a0f6ca8174a88f4eaf37887100e0ec311b
|
|
|
837927e |
|
|
|
837927e |
As `dnf` is now available on both RHEL(7,8) and Fedora (and with the `--skip-broken` switch support),
|
|
|
837927e |
we can remove the `distro` "hack".
|
|
|
837927e |
|
|
|
837927e |
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
|
|
837927e |
---
|
|
|
837927e |
retrace-server.spec.in | 1 -
|
|
|
837927e |
src/retrace/retrace_worker.py | 19 +++++--------------
|
|
|
837927e |
2 files changed, 5 insertions(+), 15 deletions(-)
|
|
|
837927e |
|
|
|
837927e |
diff --git a/retrace-server.spec.in b/retrace-server.spec.in
|
|
|
837927e |
index 5f5bbea..3b8d033 100644
|
|
|
837927e |
--- a/retrace-server.spec.in
|
|
|
837927e |
+++ b/retrace-server.spec.in
|
|
|
837927e |
@@ -40,7 +40,6 @@ Requires: python3-webob
|
|
|
837927e |
Requires: python3-magic
|
|
|
837927e |
Requires: python3-requests
|
|
|
837927e |
Requires: python3-requests-gssapi
|
|
|
837927e |
-Requires: python3-distro
|
|
|
837927e |
Requires: python3-bugzilla
|
|
|
837927e |
Requires: python3-six
|
|
|
837927e |
Requires: python3-dnf
|
|
|
837927e |
diff --git a/src/retrace/retrace_worker.py b/src/retrace/retrace_worker.py
|
|
|
837927e |
index 2ac8f6e..82748ac 100644
|
|
|
837927e |
--- a/src/retrace/retrace_worker.py
|
|
|
837927e |
+++ b/src/retrace/retrace_worker.py
|
|
|
837927e |
@@ -9,7 +9,6 @@ import shutil
|
|
|
837927e |
import stat
|
|
|
837927e |
from subprocess import Popen, PIPE, STDOUT
|
|
|
837927e |
|
|
|
837927e |
-import distro
|
|
|
837927e |
from .retrace import (ALLOWED_FILES, INPUT_PACKAGE_PARSER, REPO_PREFIX, REQUIRED_FILES,
|
|
|
837927e |
STATUS, STATUS_ANALYZE, STATUS_BACKTRACE, STATUS_CLEANUP,
|
|
|
837927e |
STATUS_FAIL, STATUS_INIT, STATUS_STATS, STATUS_SUCCESS,
|
|
|
837927e |
@@ -473,20 +472,14 @@ class RetraceWorker(object):
|
|
|
837927e |
# create mock config file
|
|
|
837927e |
try:
|
|
|
837927e |
repopath = os.path.join(CONFIG["RepoDir"], releaseid)
|
|
|
837927e |
- linux_dist = distro.linux_distribution(full_distribution_name=False)
|
|
|
837927e |
with open(os.path.join(task.get_savedir(), RetraceTask.MOCK_DEFAULT_CFG), "w") as mockcfg:
|
|
|
837927e |
mockcfg.write("config_opts['root'] = '%d'\n" % task.get_taskid())
|
|
|
837927e |
mockcfg.write("config_opts['target_arch'] = '%s'\n" % arch)
|
|
|
837927e |
- mockcfg.write("config_opts['chroot_setup_cmd'] = '")
|
|
|
837927e |
- if linux_dist[0] == "fedora":
|
|
|
837927e |
- mockcfg.write("--setopt=strict=0")
|
|
|
837927e |
- else:
|
|
|
837927e |
- mockcfg.write("--skip-broken")
|
|
|
837927e |
+ mockcfg.write("config_opts['chroot_setup_cmd'] = '--skip-broken")
|
|
|
837927e |
mockcfg.write(" install %s abrt-addon-ccpp shadow-utils %s rpm'\n" % (" ".join(packages),
|
|
|
837927e |
self.plugin.gdb_package))
|
|
|
837927e |
- mockcfg.write("config_opts['releasever'] = '%s'\n" % linux_dist[1])
|
|
|
837927e |
- if linux_dist[0] == "fedora":
|
|
|
837927e |
- mockcfg.write("config_opts['package_manager'] = 'dnf'\n")
|
|
|
837927e |
+ mockcfg.write("config_opts['releasever'] = '%s'\n" % version)
|
|
|
837927e |
+ mockcfg.write("config_opts['package_manager'] = 'dnf'\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['ccache_enable'] = False\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['yum_cache_enable'] = False\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['root_cache_enable'] = False\n")
|
|
|
837927e |
@@ -725,15 +718,13 @@ class RetraceWorker(object):
|
|
|
837927e |
|
|
|
837927e |
try:
|
|
|
837927e |
cfgfile = os.path.join(cfgdir, RetraceTask.MOCK_DEFAULT_CFG)
|
|
|
837927e |
- linux_dist = distro.linux_distribution(full_distribution_name=False)
|
|
|
837927e |
with open(cfgfile, "w") as mockcfg:
|
|
|
837927e |
mockcfg.write("config_opts['root'] = '%d-kernel'\n" % task.get_taskid())
|
|
|
837927e |
mockcfg.write("config_opts['target_arch'] = '%s'\n" % kernelver.arch)
|
|
|
837927e |
mockcfg.write("config_opts['chroot_setup_cmd'] = 'install bash coreutils cpio "
|
|
|
837927e |
"crash findutils rpm shadow-utils'\n")
|
|
|
837927e |
- mockcfg.write("config_opts['releasever'] = '%s'\n" % linux_dist[1])
|
|
|
837927e |
- if linux_dist[0] == "fedora":
|
|
|
837927e |
- mockcfg.write("config_opts['package_manager'] = 'dnf'\n")
|
|
|
837927e |
+ mockcfg.write("config_opts['releasever'] = '%s'\n" % kernelver_str)
|
|
|
837927e |
+ mockcfg.write("config_opts['package_manager'] = 'dnf'\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['ccache_enable'] = False\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['yum_cache_enable'] = False\n")
|
|
|
837927e |
mockcfg.write("config_opts['plugin_conf']['root_cache_enable'] = False\n")
|
|
|
837927e |
--
|
|
|
837927e |
2.24.1
|
|
|
837927e |
|