summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-05-15 08:45:18 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-15 09:55:22 +0200
commit06eaf17dc06d9923471d361f35bd265824adb10f (patch)
treeb44b541499e276ad2de37c4551f7a82e9f91b5c7 /scripts
parent614be4f554076f19284bdcd5b376dc27617e79b2 (diff)
downloadptxdist-06eaf17dc06d9923471d361f35bd265824adb10f.tar.gz
ptxdist-06eaf17dc06d9923471d361f35bd265824adb10f.tar.xz
ptxd_kconfig_update_config: keep an empty diff for cosmetic changes
If comments or the order of symbols change then the diff is empty. Create the diff anyways. Otherwise the sanity check in the prepare stage of kconfig packages may fail. This can happen for example with a new kernel patch stack that modifies the kernel version in the top layer. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_kconfig.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_kconfig.sh b/scripts/lib/ptxd_lib_kconfig.sh
index 29d57a241..503877830 100644
--- a/scripts/lib/ptxd_lib_kconfig.sh
+++ b/scripts/lib/ptxd_lib_kconfig.sh
@@ -140,6 +140,8 @@ ptxd_kconfig_create_config_merge() {
saved_md5="${a}"
fi
continue
+ elif [[ "${a}" =~ ^"# ptxdist:" ]]; then
+ continue
elif [ -z "${b}" ]; then
ptxd_bailout "Failed to parse" \
"$(ptxd_print_path "${diff}")" \
@@ -453,6 +455,9 @@ ptxd_kconfig_update_config() {
sed -n 's/^> \(\(# \)\?[A-Z]*_\)/\1/p' | \
sed 's/^# \(.*\) is not set$/\1=n/' | sort | \
sed 's/^\([^=]*\)=n$/# \1 is not set/' >> "${tmp}" &&
+ if [ $(wc -l < "${tmp}") -eq 1 ] && ! cmp -s "${base_config}" "${target_config}"; then
+ echo "# ptxdist: comment and sorting changes only" >> "${tmp}"
+ fi
if [ $(wc -l < "${tmp}") -gt 1 ]; then
ptxd_kconfig_save_config "${target_config}" "${config}" &&
ptxd_kconfig_save_config "${tmp}" "${config}.diff" &&