Merge #229 Mock backend: set the metadata_expire to 3600 seconds, install the module-build-macros package, fix the logs rename after build.

This commit is contained in:
Jan Kaluža
2016-11-30 16:12:15 +00:00

View File

@@ -958,7 +958,7 @@ assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0
metadata_expire=3600
mdpolicy=group:primary
# repos
@@ -1075,7 +1075,14 @@ $repos
pass
def buildroot_add_artifacts(self, artifacts, install=False):
pass
# TODO: This is just hack to install module-build-macros into the
# buildroot. We should really install the RPMs belonging to the
# right source RPM into the buildroot here, but we do not track
# what RPMs are output of particular SRPM build yet.
for artifact in artifacts:
if artifact.startswith("module-build-macros"):
self._execute_cmd(["mock", "-r", self.mock_config, "-i",
"module-build-macros"])
def buildroot_add_repos(self, dependencies):
# TODO: We support only dependencies from Koji here. This should be
@@ -1116,8 +1123,8 @@ $repos
% (args, ret))
def _save_log(self, log_name, artifact_name):
old_log = os.path.join(self.tag_dir, log_name)
new_log = os.path.join(self.tag_dir, artifact_name + "-" + log_name)
old_log = os.path.join(self.resultsdir, log_name)
new_log = os.path.join(self.resultsdir, artifact_name + "-" + log_name)
if os.path.exists(old_log):
os.rename(old_log, new_log)