diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f6386957..6899c565c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,9 +94,25 @@ option( BUILD_SCHEMA_TESTING "Enable schema-validation-tests" ON ) # all the implementations are enabled (this just means they are # **available** to `settings.conf`, not that they are used). # -# Currently, only USE_services is in use (to pick only one of the two -# modules, systemd or openrc). +# To explicitly disable a set of modules, set USE_=none +# (e.g. the literal string none), which won't match any of the +# modules but is handled specially. This is the default for +# USE_os, which are modules for specialty non-Linux distributions. +# +# The following USE_* functionalities are available: +# - *services* picks one of the two service-configuration modules, +# for either systemd or openrc. This defaults to empty so that +# **both** modules are available. +# - *os* picks an OS-specific module for things-that-are-not-Linux. +# It is generally discouraged to use this unless your distro is +# completely unable to use standard Linux tools for configuration. +# This defaults to *none* so that nothing gets picked up and nothing +# is packaged -- you must explicitly set it to empty to get all of +# the modules, but that hardly makes sense. Note, too that there +# are no os-* modules shipped with Calamares. They live in the +# *calamares-extensions* repository. set( USE_services "" CACHE STRING "Select the services module to use" ) +set( USE_os "none" CACHE STRING "Select the OS-specific module to include" ) ### Calamares application info # diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 08e5a8520..d49a4c0c0 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -59,6 +59,9 @@ calamares_explain_skipped_modules( ${LIST_SKIPPED_MODULES} ) foreach( _category ${_use_categories} ) list( FIND _found_categories ${_category} _found ) + if ( ${USE_${_category}} STREQUAL "none" ) + set( _found 0 ) + endif() if ( _found EQUAL -1 ) message( FATAL_ERROR "USE_${_category} is set to ${USE_${_category}} and no module matches." ) endif()