summaryrefslogtreecommitdiff
path: root/packaging/0001-Tizen-Remove-tizen-release-package-dependency-for-GB.patch
blob: 11235e6dc5558d5452959367cb99467c6e5f8bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From adb7b3394ff6d5e5bbd959554c2efb363ce2c148 Mon Sep 17 00:00:00 2001
From: Hyungju Lee <leee.lee@samsung.com>
Date: Mon, 27 Aug 2018 18:54:23 +0900
Subject: [PATCH] [Tizen] Remove `tizen-release` package dependency for GBS
 build

`tizen-release` package holds variables that need to be defined at the unified build.
Therefore, it is about to move to unified while coreclr stays at the base.
So, the local os-release file is introduced.

This patch is partial which comes with coreclr.spec
See review.tizen.org to fully understand the intention
---
 build.sh                            | 9 +++++++--
 src/pal/tools/gen-buildsys-clang.sh | 3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 3467387..0ad1523 100755
--- a/build.sh
+++ b/build.sh
@@ -59,8 +59,13 @@ initHostDistroRid()
 {
     if [ "$__HostOS" == "Linux" ]; then
         if [ ! -e /etc/os-release ]; then
-            echo "WARNING: Can not determine runtime id for current distro."
-            __HostDistroRid=""
+            if [ ! -e os-release ]; then
+                echo "WARNING: Can not determine runtime id for current distro."
+                __HostDistroRid=""
+            else
+               source os-release
+               __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
+            fi
         else
             source /etc/os-release
             __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh
index c809fb7..dc502a8 100755
--- a/src/pal/tools/gen-buildsys-clang.sh
+++ b/src/pal/tools/gen-buildsys-clang.sh
@@ -149,6 +149,9 @@ if [ $OS == "Linux" ]; then
     if [[ -e $linux_id_file ]]; then
         source $linux_id_file
         cmake_extra_defines="$cmake_extra_defines -DCLR_CMAKE_LINUX_ID=$ID"
+    elif [[ -e "$1/os-release" ]]; then
+        source $1/os-release
+        cmake_extra_defines="$cmake_extra_defines -DCLR_CMAKE_LINUX_ID=$ID"
     fi
 fi
 if [ "$build_arch" == "armel" ]; then
-- 
2.7.4