#256 [RFE] Optimization: Re-use previously built components if possible
Closed: Fixed Opened by psabata.

There are plenty of opportunities for component build optimizations. Consider re-using previously built RPMs by simply tagging the old RPMs into the new tag without rebuilding them. This should only happen if all of the following conditions are true:

  1. The buildroot as defined by the modulemd specification hasn't changed at all; i.e. the module-level build dependencies haven't changed -- no new deps, no deps removed, no stream changes and exactly the same versions are used.
  2. The buildorder affecting your component hasn't changed, everything that was built before it in the previous version must be built first now as well. Any included modules need to be checked, too. Recursively.
  3. The git hashes of both your component and everything that is scheduled for build before it (see above) haven't changed.

Also consider re-using RPMs built as part of other modules but that might add another level of complexity...


I'm currently working on this but I determined that we are not storing enough information to determine if the buildrequires have changed. In an attempt to address this issue, I submitted a PR (1) to have the items in the buildrequires be dictionaries to contain extra data such as the version used during the module build.

1 - https://pagure.io/modulemd/pull-request/26

287 mostly addresses this. The only case that isn't addressed is if the modulemd of a buildrequire has changed and has been rebuilt. In theory, the components within them are the exact same and could be reused. This is more complex to deal with as it involves recursive querying of buildrequires to see if they have actually changed. This can be a future RFE, but it will not be addressed at this time.

Metadata Update from @mprahl:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/mbs/issues/256

Please continue any further discussion there.

Metadata