mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-12 09:34:57 +08:00
I discovered that local builds have been broken by recent (good) changes in dnf. At the end of every batch, we regenerate the local repo with createrepo and we also call modifyrepo to include the modulemd file as we progress. This was added in #467. What we really want, is for the modulemd file to be present at the *end* of the build. Recently, dnf started respecting the modulemd file natively, such that builds we built in batch0 would not show up in batch1. They would be present in the repo, but they would be marked as belonging to a module which was not enabled, and so could not be pulled in. Every module build would fail because module-srpm-macros was in a disabled module (the module being built at the time). This change makes it so that the module metadata is only added to the repo at the very end of the build. I moved it into a `finalize` method on the builder which the copr builder was using, and for symmetry's sake I moved the koji content generator code to the same method on that builder. There was a circular import issue to solve between the koji module builder and the koji content generator modules that generated a larger diff, but is mostly cosmetic and mock changes.