diff mbox series

ts-newlib: setup git with check_git_config

Message ID 20240813141221.68592-1-mikko.rapeli@linaro.org
State New
Headers show
Series ts-newlib: setup git with check_git_config | expand

Commit Message

Mikko Rapeli Aug. 13, 2024, 2:12 p.m. UTC
ts-newlib has a custom do_patch function which is not setting
up git like poky do_patch. Build without working git config
may fail:

| *** Please tell me who you are.
|
| Run
|
|   git config --global user.email "you@example.com"
|   git config --global user.name "Your Name"
|
| to set your account's default identity.
| Omit --global to set the identity only in this repository.
|
| fatal: unable to auto-detect email address (got 'tuxbake@81d82e1ac791.(none)')

Fix this by calling check_git_config from poky utils
to setup git correctly.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 .../recipes-security/trusted-services/ts-newlib_4.1.0.bb  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-arm/recipes-security/trusted-services/ts-newlib_4.1.0.bb b/meta-arm/recipes-security/trusted-services/ts-newlib_4.1.0.bb
index 866276b3..1fda415a 100644
--- a/meta-arm/recipes-security/trusted-services/ts-newlib_4.1.0.bb
+++ b/meta-arm/recipes-security/trusted-services/ts-newlib_4.1.0.bb
@@ -25,7 +25,13 @@  export NEWLIB_CFLAGS_TARGET = "-Wno-implicit-function-declaration -Wno-int-conve
 
 # TS ships a patch that needs to be applied to newlib
 apply_ts_patch() {
-    ( cd ${WORKDIR}/git/newlib;    git stash; git branch -f bf_am; git am ${S}/external/newlib/*.patch; git reset bf_am )
+    set -ex
+    cd ${WORKDIR}/git/newlib
+    check_git_config
+    git stash
+    git branch -f bf_am
+    git am ${S}/external/newlib/*.patch
+    git reset bf_am
 }
 do_patch[postfuncs] += "apply_ts_patch"