Blame mbs-macros-repo-regen.patch

34012c2
diff --git a/module_build_service/scheduler/handlers/modules.py b/module_build_service/scheduler/handlers/modules.py
34012c2
index 363bff6..0249be3 100644
34012c2
--- a/module_build_service/scheduler/handlers/modules.py
34012c2
+++ b/module_build_service/scheduler/handlers/modules.py
34012c2
@@ -292,16 +292,13 @@ def wait(config, session, msg):
34012c2
     session.add(build)
34012c2
     session.commit()
34012c2
 
34012c2
-    # If this build already exists and is done, then regenerate the repository
34012c2
-    # to ensure module-build-macros is there.
34012c2
-    if state == koji.BUILD_STATES['COMPLETE']:
34012c2
-        if config.system == "koji":
34012c2
-            log.info("module-build-macros is already built. "
34012c2
-                "Regenerating the repo.")
34012c2
-            task_id = builder.koji_session.newRepo(
34012c2
-                builder.module_build_tag['name'])
34012c2
-            build.new_repo_task_id = task_id
34012c2
-            session.commit()
34012c2
-        else:
34012c2
-            return [module_build_service.messaging.KojiRepoChange(
34012c2
-                'fake msg', builder.module_build_tag['name'])]
34012c2
+    # We always have to regenerate the repository.
34012c2
+    if config.system == "koji":
34012c2
+        log.info("Regenerating the repository")
34012c2
+        task_id = builder.koji_session.newRepo(
34012c2
+            builder.module_build_tag['name'])
34012c2
+        build.new_repo_task_id = task_id
34012c2
+        session.commit()
34012c2
+    else:
34012c2
+        return [module_build_service.messaging.KojiRepoChange(
34012c2
+            'fake msg', builder.module_build_tag['name'])]