From c91b716e09f9b25e02c4827d08c92d11d5c9ff6c Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Sat, 2 Mar 2019 11:09:32 +0100 Subject: [PATCH] HaikuDepot : Generate Sources -Fix Build In recent changes to HD's build files to generate some sources at build-time there was a problem with builds that were configured to run with some element of concurrency. In this change, the steps that should be in sequence are done with shell commands to avoid race conditions. Change-Id: I5b6fb4907d8ea5f3ca90de956ecce322cd89c685 Reviewed-on: https://review.haiku-os.org/c/1130 Reviewed-by: Adrien Destugues --- src/apps/haikudepot/build/jam/HdsSchemaGenRules | 10 ++++------ src/apps/haikudepot/model/Model.cpp | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/apps/haikudepot/build/jam/HdsSchemaGenRules b/src/apps/haikudepot/build/jam/HdsSchemaGenRules index 8d2100b730..c72a3e15e2 100644 --- a/src/apps/haikudepot/build/jam/HdsSchemaGenRules +++ b/src/apps/haikudepot/build/jam/HdsSchemaGenRules @@ -39,15 +39,14 @@ rule HdsSchemaGenModel Clean $(1:D) ; Depends $(1) : $(2) $(3) ; - - MkDir $(1:D) ; - HdsSchemaGenTouch $(1) ; HdsSchemaGenModel1 $(1) : $(2) $(3) $(1:D) ; } actions HdsSchemaGenModel1 { + mkdir -p $(2[3]) python $(2[2]) -i $(2[1]) --outputdirectory $(2[3]) + touch $(1) } # pragma mark - Bulk Parsing Class Generation @@ -63,15 +62,14 @@ rule HdsSchemaGenBulkParser Clean $(1:D) ; Depends $(1) : $(2) $(3) ; - - MkDir $(1:D) ; - HdsSchemaGenTouch $(1) ; HdsSchemaGenBulkParser1 $(1) : $(2) $(3) $(1:D) ; } actions HdsSchemaGenBulkParser1 { + mkdir -p $(2[3]) python $(2[2]) -i $(2[1]) --outputdirectory $(2[3]) --supportbulkcontainer + touch $(1) } # pragma mark - Registering Generated Classes diff --git a/src/apps/haikudepot/model/Model.cpp b/src/apps/haikudepot/model/Model.cpp index 6b77a2bfe6..f6ee6a675f 100644 --- a/src/apps/haikudepot/model/Model.cpp +++ b/src/apps/haikudepot/model/Model.cpp @@ -406,7 +406,7 @@ Model::Model() // Force the preferred language to one of the currently supported // ones, until the web application supports all ISO language codes. printf("User preferred language '%s' not currently supported, " - "defaulting to 'en'.", fPreferredLanguage.String()); + "defaulting to 'en'.\n", fPreferredLanguage.String()); fPreferredLanguage = "en"; } fWebAppInterface.SetPreferredLanguage(fPreferredLanguage);