[OS-BUILD PATCHv2] redhat/configs/process_configs.sh: Fix race with tools generation

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/configs/process_configs.sh: Fix race with tools generation

Kernel builds are occasionally failing with (for example):

Processing /home/prarit/rpmbuild/BUILD/kernel-5.17/linux-5.17.0-0.test.fc35.x86_64/configs/kernel-5.17.0-s390x.config ...
Processing /home/prarit/rpmbuild/BUILD/kernel-5.17/linux-5.17.0-0.test.fc35.x86_64/configs/kernel-5.17.0-x86_64-debug.config ...
Processing /home/prarit/rpmbuild/BUILD/kernel-5.17/linux-5.17.0-0.test.fc35.x86_64/configs/kernel-5.17.0-x86_64.config ...
/bin/sh: line 1: scripts/basic/fixdep: Text file busy
make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 126
make[1]: *** Deleting file 'scripts/basic/fixdep'
make: *** [Makefile:559: scripts_basic] Error 2
/bin/sh: line 1: scripts/basic/fixdep: Text file busy
make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 126
make[1]: *** Deleting file 'scripts/basic/fixdep'
make: *** [Makefile:559: scripts_basic] Error 2

This occurs because the makes are conflicting with one another to create
the same files.  This can be fixed by having the first make run on it's
own, and then having the remainder run in parallel.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/configs/process_configs.sh b/redhat/configs/process_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/process_configs.sh
+++ b/redhat/configs/process_configs.sh
@@ -304,6 +304,11 @@ function process_configs()
 	count=0
 	for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config
 	do
+		if [ "$count" -eq 0 ]; then
+			# do the first one by itself so that tools are built
+			process_config "$cfg" "$count"
+			continue
+		fi
 		process_config "$cfg" "$count" &
 		waitpids[${count}]=$!
 		((count++))

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1673
_______________________________________________
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 on the list, report it: https://pagure.io/fedora-infrastructure




[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