Call finalize method on builder

This commit is contained in:
Jakub Kadlčík
2016-11-23 01:41:59 +01:00
parent f9220a4470
commit 7c8349e50c
2 changed files with 14 additions and 0 deletions

View File

@@ -240,6 +240,19 @@ class GenericBuilder(six.with_metaclass(ABCMeta)):
"""
raise NotImplementedError()
def finalize(self):
"""
:return: None
This method is supposed to be called after all module builds are
successfully finished.
It could be utilized for various purposes such as cleaning or
running additional build-system based operations on top of
finished builds (e.g. for copr - composing them into module)
"""
pass
@classmethod
@abstractmethod
def repo_from_tag(self, config, tag_name, arch):

View File

@@ -139,3 +139,4 @@ def done(config, session, msg):
else:
module_build.transition(config, state=models.BUILD_STATES['done'])
session.commit()
builder.finalize()