diff options
author | Alexey Neyman <stilor@att.net> | 2019-01-20 16:42:12 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-01-26 13:13:32 -0800 |
commit | 57e5be632d4e40314cd8d1a67973ee1e58d3dfb8 (patch) | |
tree | 21fd3ff534587fc94aef3c622e3e2a00e8eee102 /config/global.in | |
parent | 127c6cc64dcb5b1e47e7e5eecb0aac6f6ae0b48e (diff) | |
download | crosstool-ng-57e5be632d4e40314cd8d1a67973ee1e58d3dfb8.tar.gz crosstool-ng-57e5be632d4e40314cd8d1a67973ee1e58d3dfb8.tar.bz2 crosstool-ng-57e5be632d4e40314cd8d1a67973ee1e58d3dfb8.zip |
Basic framework for checking config file version
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/global.in')
-rw-r--r-- | config/global.in | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/config/global.in b/config/global.in index 0dff199c..a19667b7 100644 --- a/config/global.in +++ b/config/global.in @@ -1,14 +1,47 @@ # Overall toolchain configuration: paths, jobs, etc... -config CT_VERSION +config VERSION string option env="CT_VERSION" +# Config version checking framework. If CONFIG_VERSION is unset in the current .config +# or defconfig, it is loaded as 0 (possibly triggering a user prompt during 'ct-ng oldconfig'). +# If the value of CONFIG_VERSION is older than CONFIG_VERSION_CURRENT, we'll advice the user +# to run the configuration through an upgrade. If it is newer, we'll error out - I have no +# crystal orb to perform the downgrade. + +# Hack to make kconfig save/load the value for CONFIG_VERSION. Set to empty value (for +# normal operations like 'ct-ng menuconfig'); 'load' for creating a configuration from a (potentially) +# old file, i.e. 'ct-ng <sample>' or 'ct-ng oldconfig'; 'save' for saving the current configuration, +# i.e. 'ct-ng saveconfig' or 'ct-ng savedefconfig'. +config VCHECK + string + option env="CT_VCHECK" + +config CONFIG_VERSION_CURRENT + string + default -1 if VCHECK = "save" + default 1 + +config CONFIG_VERSION + string + prompt "** make it changeable **" if VCHECK = "load" || VCHECK = "save" + default 0 if VCHECK = "load" || VCHECK = "save" + default CONFIG_VERSION_CURRENT + +if VCHECK = "warning" +comment "*************************************************************************" +comment "Loaded configuration was generated by a previous version of crosstool-NG." +comment "Saving it will mark the configuration as up-to-date without verifying it." +comment "It is recommended to run \"ct-ng upgradeconfig\" before making any " +comment "changes to the configuration. " +comment "*************************************************************************" +endif + # Allow unconditional usage of tristates config MODULES - bool + def_bool y option modules - default y menu "Paths and misc options" |