From 2abb3977c368c2e77cbc404fcae059f19384dc1b Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 28 Sep 2018 13:21:28 +0200 Subject: 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 --- scripts/lib/ptxd_lib_kconfig.sh | 11 +++++++++-- 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 \ -- cgit v1.2.3