diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-13 06:55:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 06:55:55 (GMT) |
commit | 2da27758a9638b07f06d490251f0e44abf398057 (patch) | |
tree | 4ec507c1c598bbbd75b1e0846d01f383bef19f99 /scripts/upgrade/README | |
parent | db4fdf015061e5c8a39cbb3c8ff4c33bea9ebdf8 (diff) | |
parent | 47e16f64e4bb98b8bd616a9bf45f80113a0794f1 (diff) |
Merge pull request #1136 from stilor/upgrading2
Upgradability, phase 2
Diffstat (limited to 'scripts/upgrade/README')
-rw-r--r-- | scripts/upgrade/README | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/upgrade/README b/scripts/upgrade/README new file mode 100644 index 0000000..51760ea --- /dev/null +++ b/scripts/upgrade/README @@ -0,0 +1,23 @@ +Upgrade scripts for specific versions of the config file. +Each script must define a function `upgrade` that can +assume `${opt}` and `${val}` variables set on input. On +output, if `${opt}` is unset - so will be the corresponding +option. + +One thing to keep in mind is that this script may be invoked +on full config - or on a defconfig. Do not assume that all +options will be present! If an option is not specified, use +the value it had as a default for the fallback; to check if +it has been specified, use `$selected_opts` associative +array to check if it has been present in the config file +(otherwise, you an option not being set after sourcing the +previous version of the config is ambiguous - it could be +that the option is called out as `# CT_FOO is not set` (i.e. +selected as false) or not present at all (i.e. selected as +default). + +If it is not possible to determine the settings of an option +because a different controlling option is not set, either +err out (see CT_LIBC_UCLIBC_CUSTOM in v0 for an example) +or select a sane default and issue a warning (see CT_GDB_CUSTOM +in v0 for an example). |