From 38729ac1dc718b85a34329861b689d8608867a6a Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Thu, 6 Jan 2022 17:03:39 +0100 Subject: [PATCH] sdk_lib/sdk_entry: handle permission error for target version file The creation of the target version file failed: /home/sdk/sdk_entry.sh: line 32: /build/amd64-usr/etc/target-version.txt: Permission denied Use root permissions to create the file. --- sdk_lib/sdk_entry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_lib/sdk_entry.sh b/sdk_lib/sdk_entry.sh index fdb0a671f1..69b5c68c0b 100755 --- a/sdk_lib/sdk_entry.sh +++ b/sdk_lib/sdk_entry.sh @@ -29,7 +29,7 @@ chown -R sdk:sdk /home/sdk echo "Updating board support in '/build/${target}' to use package cache for version '${FLATCAR_VERSION_ID}'" echo "---" sudo su sdk -l -c "/home/sdk/trunk/src/scripts/setup_board --board='$target' --regen_configs_only" - echo "TARGET_FLATCAR_VERSION_ID='${FLATCAR_VERSION_ID}'" > "/build/$target/etc/target-version.txt" + echo "TARGET_FLATCAR_VERSION_ID='${FLATCAR_VERSION_ID}'" | sudo tee "/build/$target/etc/target-version.txt" >/dev/null done fi )