mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-28 04:32:54 +08:00
Redirect createrepo_c output to the build logs
It's more useful to have the createrepo_c output in the build logs than cluttering the build stdout.
This commit is contained in:
@@ -23,7 +23,7 @@ from module_build_service.builder.utils import (
|
||||
get_koji_config,
|
||||
validate_koji_tag,
|
||||
)
|
||||
from module_build_service.common import conf, log, models
|
||||
from module_build_service.common import build_logs, conf, log, models
|
||||
from module_build_service.common.koji import get_session
|
||||
from module_build_service.common.modulemd import Modulemd
|
||||
from module_build_service.common.utils import import_mmd, load_mmd_file, mmd_to_str
|
||||
@@ -409,14 +409,16 @@ class MockModuleBuilder(GenericBuilder):
|
||||
m1_mmd.add_rpm_artifact(artifact_to_add)
|
||||
|
||||
# Generate repo.
|
||||
execute_cmd(["/usr/bin/createrepo_c", "--pkglist", pkglist, path])
|
||||
execute_cmd(["/usr/bin/createrepo_c", "--pkglist", pkglist, path],
|
||||
output=build_logs.current_log_stream)
|
||||
|
||||
# ...and inject modules.yaml there if asked.
|
||||
if include_module_yaml:
|
||||
mmd_path = os.path.join(path, "modules.yaml")
|
||||
with open(mmd_path, "wb") as f:
|
||||
f.write(mmd_to_str(m1_mmd).encode("utf-8"))
|
||||
execute_cmd(["/usr/bin/modifyrepo_c", "--mdtype=modules", mmd_path, repodata_path])
|
||||
execute_cmd(["/usr/bin/modifyrepo_c", "--mdtype=modules", mmd_path, repodata_path],
|
||||
output=build_logs.current_log_stream)
|
||||
|
||||
def _add_repo(self, name, baseurl, extra=""):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user