[OS-BUILD PATCH] redhat: avoid picking up stray editor backups when processing configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Clark Williams <williams@xxxxxxxxxx>

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@xxxxxxxxxx>

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
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux