arpa2 / mkroot

InternetWide Architecture Component Builders
1 stars 0 forks source link

Support for "mkhere" version, variant and flavour #3

Closed vanrein closed 4 years ago

vanrein commented 4 years ago

We currently let mkhere decide about the versions to use. That, however, makes the environments less stable than desirable for mkroot operation.

Instead, allow the setup of VERSION=xxx and VARIANT=yyy and FLAVOUR=zzz directly before or after a package name. (After reads nicer, and seems most consistent.)

Example:

rootfs_packages(
   arpa2shell VERSION=0.3   FLAVOUR=arpa2dns
   twin       VERSION=0.7.3
)

These should probably be cached variables, or possibly overridden in the cache. If the above was for component arpa2dns, there would be a few variables to complement this setup:

When building for the component arpa2dns, these variables would be made available as VERSION_arpa2shell, FLAVOUR_arpa2shell and VERSION_twin to the builds of arpa2shell and twin, as apropriate.

vanrein commented 4 years ago

The non-declared variables should also be available in the cache, but as strings with an empty value. This allows overrides to be made.

Cache values overriding the above definitions in the scripts will lead to a warning message.

Note: CMake might crash on empty strings. Sigh. So let's use (set_by_mkhere) instead and replace that with an empty string when it comes up.

vanrein commented 4 years ago

Strikken: The following was a temporary sign of lack of fanatasy.

It's pretty impossible to postfix with simple CMake logic. So, instead, let's prefix:

rootfs_packages(
   VERSION=0.3   FLAVOUR=arpa2dns  arpa2shell
   VERSION=0.7.3                   twin
)

vanrein commented 4 years ago

Finished with commit c0213333bf7996c6fcc451ec0e645ed9325a215b.