Draft: RFC: Allow to overrride blueprint repository from projects
This is not a complete MR, and more a discussion starter. Essentially, for practical purposes, we currently have all craft blueprints in a single monolithic database. Historically, this went hand in hand with a centralized binary-factory setup. The idea, here, is to allow to extend and/or customize the blueprints database on a per-project basis.
Some use cases:
- A project wants to add an experimental/optional/corner case dependency that may not justify the support-burden of inclusion in the main blueprint database (e.g. rkward as detailed in packaging/craft-blueprints-kde!954 (closed) - still lacking a solution)
- A project wants to build some dependency with specific options which are not suitable for inclusion in general (e.g. digikam as detailed in https://bugs.kde.org/show_bug.cgi?id=350446#c21 - bottom line is they are not using craft at all)
- A project wants to add / update a dependency, and this requires synchronized changes to the project repository and craft-blueprints-kde
- A project simply wants to test whether a certain blueprint change will help to address a project-specific problem on a specific platform, without causing breakage for everybody else
Reasons going against this proposal:
- Fragmentation: We can no longer rely on craft-blueprints-kde to be the canonical location of craft blueprints. In an ideal world all relevant changes are backported to craft-blueprints-kde, but in the real world this will not always happen.
- Craft binary cache: It may not be reasonably possible to cache pre-built packages for customized blueprints, thus increasing the workload.
Implementation notes:
- The approach is rather crude in simply copying the contents of an (optional) blueprints folder after initial setup.
- The idea behind
KDECI_CRAFT_PROJECT_NAME
is that projects may want to build a different blueprint name. Importantly, the project may e.g. provide and build a "myproject-extended" blueprint, which depends on the regular "myproject" blueprint in craft-blueprints-kde, but simply adds extra dependencies on top of that.