Sort preload files by name due to dependencies of each module (#225) accepted/tizen/5.5/unified/20200429.140214 accepted/tizen/unified/20200429.051913 submit/tizen/20200429.120649 submit/tizen_5.5/20200429.120457
author최종헌/Common Platform Lab(SR)/Engineer/삼성전자 <j-h.choi@samsung.com>
Wed, 29 Apr 2020 02:37:58 +0000 (11:37 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 29 Apr 2020 02:37:58 +0000 (11:37 +0900)
Change-Id: I4addc2fc049eeb9433f32fb85723d7b6194bed9f

Managed/Tizen.Runtime/Tizen.Runtime.cs
packaging/10.Dotnet.Launcher.preload [moved from packaging/Dotnet.Launcher.preload with 100% similarity]
packaging/dotnet-launcher.spec

index e88aadb..6a87da2 100644 (file)
@@ -25,16 +25,17 @@ namespace Tizen.Runtime
         const string preloadPath = "/usr/share/dotnet.tizen/preload/";
         public static void Preload()
         {
-            DirectoryInfo directory = new DirectoryInfo(preloadPath);
-            foreach (FileInfo file in directory.GetFiles())
+            string[] paths = Directory.GetFiles(preloadPath);
+            Array.Sort(paths);
+            foreach (string path in paths)
             {
-                if (file.Extension.CompareTo(".preload") != 0)
+                if (Path.GetExtension(path) != ".preload")
                     continue;
 
                 try
                 {
                     BindingFlags bindingFlag = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
-                    foreach (string line in File.ReadLines(file.FullName))
+                    foreach (string line in File.ReadLines(path))
                     {
                         if (line.StartsWith('#') || !line.Contains(".dll") || !line.Contains(' '))
                             continue;
@@ -84,11 +85,11 @@ namespace Tizen.Runtime
                 catch (IOException e)
                 {
                     Console.WriteLine(e.ToString());
-                    Console.WriteLine("[ERROR] Failed to " + file.FullName + " file open");
+                    Console.WriteLine("[ERROR] Failed to " + path + " file open");
                 }
                 finally
                 {
-                    Console.WriteLine("Success to preload : " + file.Name);
+                    Console.WriteLine("Success to preload : " + path);
                 }
             }
 
index fff6c23..f33c6f2 100644 (file)
@@ -144,7 +144,7 @@ install -m 0644 %{name}.conf %{buildroot}/etc/tmpfiles.d/%{name}.conf
 mkdir -p %{buildroot}%{_ibc_data_dir}
 unzip packaging/ibcdata.zip -d %{buildroot}%{_ibc_data_dir}
 mkdir -p %{buildroot}%{_tizen_preload_dir}
-mv packaging/Dotnet.Launcher.preload %{buildroot}%{_tizen_preload_dir}
+mv packaging/10.Dotnet.Launcher.preload %{buildroot}%{_tizen_preload_dir}
 
 %post
 mkdir -p /opt/etc/skel/.dotnet