diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-11-29 19:13:33 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-11-29 19:15:44 +0100 |
commit | 9782a500a60c6f65dd77335d3ee13a350dde0b12 (patch) | |
tree | 6543acaf62dceacf727250bab9bc59750ccb09b0 /scripts | |
parent | 26093e56234e4ec130137f09c07faf3f41ecb74d (diff) | |
download | ptxdist-9782a500a60c6f65dd77335d3ee13a350dde0b12.tar.gz ptxdist-9782a500a60c6f65dd77335d3ee13a350dde0b12.tar.xz |
ptxd_kconfig: fix restoring missing diff
If the diff is missing, then it must be regenerated from base and current
config. If the current config is up to date then no config files are
written and no diff is generated.
Force a config update if the diff is missing to ensure a new one is
generated.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_lib_kconfig.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_kconfig.sh b/scripts/lib/ptxd_lib_kconfig.sh index 2f9ec17ee..ea89ab0bb 100644 --- a/scripts/lib/ptxd_lib_kconfig.sh +++ b/scripts/lib/ptxd_lib_kconfig.sh @@ -195,6 +195,12 @@ ptxd_kconfig_create_config() { else if [ -e "${config}" ]; then cp -- "${config}" "${target}" + if [ -n "${base}" ]; then + echo -e "\nMissing diff, forcing config update...\n" + # this will be dropped, but forces kconfig to write the config + prefix="$(sed -n '/^[A-Z]/{s/\([^_]*_\).*/\1/p;q}' "${target}")" + echo "# ${prefix}OPTION_DOES_NOT_EXIST is not set" >> "${target}" + fi fi fi && stat -c '%y' "${target}" > "${target}.stamp" |