diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-05-07 08:33:37 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-05-07 08:33:39 +0200 |
commit | 30501a6fad899d46f26cb12aba71ecb2d216581d (patch) | |
tree | 9ccb72d1364841685047997b8f98e5a240eac5f3 | |
parent | e999e3a92a2fb0ec9ae249bd1f043f05d74dea90 (diff) | |
download | ptxdist-30501a6fad899d46f26cb12aba71ecb2d216581d.tar.gz ptxdist-30501a6fad899d46f26cb12aba71ecb2d216581d.tar.xz |
ptxd_make_world_package_info: improve rev config handling when layers are involved
If a config is found in a base layer then this is used to calculate the
diff. So the ref config is only used if no lower layer has a config.
Improve the package-info output to take this into account:
- print the ref config only if it is actually used
- otherwise print the used base config from a lower layer
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_kconfig.sh | 9 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_package_info.sh | 18 |
2 files changed, 24 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_make_world_kconfig.sh b/scripts/lib/ptxd_make_world_kconfig.sh index 520051916..0aea53168 100644 --- a/scripts/lib/ptxd_make_world_kconfig.sh +++ b/scripts/lib/ptxd_make_world_kconfig.sh @@ -16,12 +16,17 @@ ptxd_make_world_kconfig_mode() { } export -f ptxd_make_world_kconfig_mode -ptxd_make_kconfig_setup() { +ptxd_make_kconfig_init() { if [ -n "${ref_file_dotconfig}" ]; then file_dotconfig="${ref_file_dotconfig}" ptxd_normalize_config && relative_ref_file_dotconfig="${relative_file_dotconfig}" fi && - ptxd_normalize_config && + ptxd_normalize_config +} +export -f ptxd_make_kconfig_init + +ptxd_make_kconfig_setup() { + ptxd_make_kconfig_init && ptxd_kconfig_setup_config "${ptx_config_mode}" "${pkg_build_dir}/.config" \ "${relative_file_dotconfig}" "${file_dotconfig}" "${relative_ref_file_dotconfig}" if [ ${?} -ne 0 ]; then diff --git a/scripts/lib/ptxd_make_world_package_info.sh b/scripts/lib/ptxd_make_world_package_info.sh index 4d17f3d2c..48b7b21da 100644 --- a/scripts/lib/ptxd_make_world_package_info.sh +++ b/scripts/lib/ptxd_make_world_package_info.sh @@ -7,6 +7,8 @@ # ptxd_make_world_package_info() { + local last_config base_config ref_config + # use patchin_init for pkg_patch_dir ptxd_make_world_patchin_init || return do_echo() { @@ -26,8 +28,22 @@ ptxd_make_world_package_info() { do_echo "image:" "$(ptxd_print_path "${image_image}")" echo + if [ -n "${pkg_config}" ]; then + local file_dotconfig="${pkg_config}" + local ref_file_dotconfig="${pkg_ref_config}" + ptxd_make_kconfig_init + ptxd_kconfig_find_config "update" "${relative_file_dotconfig}" "${relative_ref_file_dotconfig}" + if [ "${base_config}" = "${pkg_ref_config}" ]; then + base_config= + fi + if [ -z "${base_config}" ]; then + ref_config="${pkg_ref_config}" + fi + fi + do_echo "config:" "$(ptxd_print_path "${pkg_config}")" - do_echo "ref config:" "$(ptxd_print_path "${pkg_ref_config}")" + do_echo "base config:" "$(ptxd_print_path "${base_config}")" + do_echo "ref config:" "$(ptxd_print_path "${ref_config}")" do_echo "${pkg_config}" do_echo "license:" "${pkg_license}" |