[OS-BUILD PATCHv6 6/9] redhat/configs/build_configs.sh: Create unique output files

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/configs/build_configs.sh: Create unique output files

Create unique output files from merge_configs().

Signed-off-by: Prarit Bhargava <prarit@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
@@ -58,6 +58,7 @@ function merge_configs()
 	local configs
 	local order
 	local flavor
+	local count
 	local name
 	local skip_if_missing
 
@@ -66,10 +67,11 @@ function merge_configs()
 	configs=$2
 	order=$3
 	flavor=$4
+	count=$5
 
 	name=$OUTPUT_DIR/$PACKAGE_NAME-$archvar-$flavor.config
 	echo -n "Building $name ... "
-	touch config-merging config-merged
+	touch config-merging.$count config-merged.$count
 
 	# apply based on order
 	skip_if_missing=""
@@ -81,10 +83,10 @@ function merge_configs()
 
 			test -n "$skip_if_missing" && test ! -e "$cfile" && continue
 
-			if ! perl merge.pl "$cfile" config-merging > config-merged; then
+			if ! perl merge.pl "$cfile" config-merging.$count > config-merged.$count; then
 				die "Failed to merge $cfile"
 			fi
-			mv config-merged config-merging
+			mv config-merged.$count config-merging.$count
 		done
 
 		# first configs in $order is baseline, all files should be
@@ -104,8 +106,8 @@ function merge_configs()
 	else
 		echo "# $arch" > "$name"
 	fi
-	sort config-merging >> "$name"
-	rm -f config-merged config-merging
+	sort config-merging.$count >> "$name"
+	rm -f config-merged.$count config-merging.$count
 	echo "done"
 }
 
@@ -149,7 +151,7 @@ function build_flavor()
 				esac
 			fi
 
-			merge_configs "$arch" "$configs" "$order" "$flavor"
+			merge_configs "$arch" "$configs" "$order" "$flavor" "$count"
 		fi
 	done < "$control_file"
 }

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1635
_______________________________________________
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