diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-09-28 13:21:28 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-09-28 13:39:43 +0200 |
commit | 2abb3977c368c2e77cbc404fcae059f19384dc1b (patch) | |
tree | b31b0dcca5c1066ba2f825288d04835ef54dca4f | |
parent | c41e2f9c242ab87a0f7b541889b73ee8705c94db (diff) | |
download | ptxdist-2abb3977c368c2e77cbc404fcae059f19384dc1b.tar.gz ptxdist-2abb3977c368c2e77cbc404fcae059f19384dc1b.tar.xz |
ptxd_kconfig_validate_config: skip the current layer when updating the config
This is the config that will be updated, so it's ok if it is not
up-to-date.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_lib_kconfig.sh | 11 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_kconfig.sh | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_lib_kconfig.sh b/scripts/lib/ptxd_lib_kconfig.sh index c70522998..23e13dd2f 100644 --- a/scripts/lib/ptxd_lib_kconfig.sh +++ b/scripts/lib/ptxd_lib_kconfig.sh @@ -206,8 +206,15 @@ ptxd_kconfig_validate_config() { local relative_config="${1}" local file_md5 saved_md5 local last next + local -a layers + + if [ "${mode}" = update ]; then + layers=( "${PTXDIST_LAYERS[@]:1}" ) + else + layers=( "${PTXDIST_LAYERS[@]}" ) + fi - for layer in ""${PTXDIST_LAYERS[@]}""; do + for layer in "${layers[@]}"; do next="${layer}/${relative_config}" # no config in this layer if [ ! -e "${next}" -a ! -e "${next}.diff" ]; then @@ -255,7 +262,7 @@ ptxd_kconfig_find_config() { local relative_ref_config="${3}" local -a layers - if [ "${mode}" = run ]; then + if [ "${mode}" = run -o "${mode}" = "update" ]; then ptxd_kconfig_validate_config "${relative_config}" || return fi diff --git a/scripts/lib/ptxd_make_world_kconfig.sh b/scripts/lib/ptxd_make_world_kconfig.sh index 6d1e8b45e..bb3cdc853 100644 --- a/scripts/lib/ptxd_make_world_kconfig.sh +++ b/scripts/lib/ptxd_make_world_kconfig.sh @@ -62,7 +62,13 @@ export -f ptxd_make_world_kconfig_sync ptxd_make_kconfig() { local file_dotconfig="${pkg_config}" local ref_file_dotconfig="${pkg_ref_config}" - local ptx_config_mode=run + + if [ -z "${ptx_config_mode}" ]; then + case "${pkg_stage}" in + *config) ptx_config_mode=update ;; + *) ptx_config_mode=run ;; + esac + fi ptxd_make_kconfig_setup && ptxd_eval \ |