From: Clark Williams <williams(a)redhat.com>
redhat: avoid picking up stray editor backups when processing configs
Emacs and vim both use a trailing '~' to designate a backup file. This
can cause puzzling behavior in the config generation logic because the
build_configs.sh script will pick up both CONFIG_FOO and CONFIG_FOO~,
which presumably have different values. Just avoid this by filtering
out files with ~ extension when picking up CONFIGS from a directory.
Signed-off-by: Clark Williams <williams(a)redhat.com>
diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/build_configs.sh
+++ b/redhat/configs/build_configs.sh
@@ -49,7 +49,8 @@ function combine_config_layer()
return
fi
- cat "$dir"/CONFIG_* > "$file"
+ # avoid picking up editor backup files
+ cat $(ls -1 "$dir"/CONFIG_* | grep -v "~$") > "$file"
}
function merge_configs()
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2149