From: Prarit Bhargava <prarit@xxxxxxxxxx> redhat/configs/process_configs.sh: Parallelize execution Parallelize the execution of each config processing. The '+' adds job processing to 'non-make' commands [1]. [1] https://www.gnu.org/software/make/manual/html_node/Error-Messages.html Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -121,11 +121,11 @@ dist-kabi-dw-check: dist-kabi @rm -rf $(KABIDW)/base/$(CURARCH).tmp dist-configs-commit: dist-configs-prep - @cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ + +@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ ./process_configs.sh -z $(PACKAGE_NAME) $(KVERSION) "" $(FLAVOR) dist-configs: dist-configs-prep - @cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ + +@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ ./process_configs.sh $(PROCESS_CONFIGS_OPTS) $(PACKAGE_NAME) $(KVERSION) dist-fedora-configs: FLAVOR = fedora @@ -137,7 +137,7 @@ dist-rhel-configs: dist-configs rh-configs: dist-rhel-configs dist-configs-check: dist-configs-prep - cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) $(PACKAGE_NAME) + +cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) $(PACKAGE_NAME) dist-configs-prep: dist-clean-configs dist-buildreq-check cd $(REDHAT)/configs; ./build_configs.sh "partial" "$(ARCH_MACH)" "snip" 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 @@ -106,7 +106,6 @@ checkoptions() sed -i "1s/^/Error: Mismatches found in configuration files for ${variant}\n/" .mismatches${count} cat .mismatches${count} - RETURNCODE=1 [ "$CONTINUEONERROR" ] || exit 1 else rm -f .mismatches${count} @@ -255,8 +254,8 @@ function process_config() grep -E 'CONFIG_' .listnewconfig${count} > .newoptions${count} if test -n "$NEWOPTIONS" && test -s .newoptions${count} then - echo "Found unset config items in ${variant}, please set them to an appropriate value" - cat .newoptions${count} + echo "Found unset config items in ${variant}, please set them to an appropriate value" >> .errors${count} + cat .newoptions${count} >> .errors${count} rm .newoptions${count} RETURNCODE=1 [ "$CONTINUEONERROR" ] || exit 1 @@ -266,10 +265,9 @@ function process_config() grep -E 'config.*warning' .listnewconfig${count} > .warnings${count} if test -n "$CHECKWARNINGS" && test -s .warnings${count} then - echo "Found misconfigured config items in ${variant}, please set them to an appropriate value" - cat .warnings${count} + echo "Found misconfigured config items in ${variant}, please set them to an appropriate value" >> .errors${count} + cat .warnings${count} >> .errors${count} rm .warnings${count} - RETURNCODE=1 [ "$CONTINUEONERROR" ] || exit 1 fi rm .warnings${count} @@ -302,13 +300,30 @@ function process_configs() count=0 for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config do - process_config "$cfg" "$count" + process_config "$cfg" "$count" & + waitpids[${count}]=$! ((count++)) done + for pid in ${waitpids[*]}; do + wait ${pid} + done + rm "$SCRIPT_DIR"/*.config*.old + + if ls .errors* 1> /dev/null 2>&1; then + RETURNCODE=1 + cat .errors* + rm .errors* -f + fi + if ls .mismatches* 1> /dev/null 2>&1; then + RETURNCODE=1 + cat .mismatches* + rm .mismatches* -f + fi + popd > /dev/null - echo "Processed config files are in $SCRIPT_DIR" + [ $RETURNCODE -eq 0 ] && echo "Processed config files are in $SCRIPT_DIR" } CHECKOPTIONS="" -- 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