Fix dotnet app install failure in image creation stage 46/194346/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Mon, 3 Dec 2018 08:57:34 +0000 (17:57 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Mon, 3 Dec 2018 09:00:42 +0000 (18:00 +0900)
During image creation stage, vconf API does not work.

Change-Id: Ie57b403463fe6e43c9095c0e55291f4eed247b27
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/step/configuration/step_check_tizen_version.cc

index 4d3be58..21f7ca4 100644 (file)
@@ -73,8 +73,14 @@ bool StepCheckTizenVersion::ComparePlatformVersion(const std::string& version) {
 bool StepCheckTizenVersion::CompareDotnetVersion(const std::string& version) {
   int dotnet_api_level;
   if (vconf_get_int(kDotnetAPILevelVconfKey, &dotnet_api_level)) {
-    LOG(ERROR) << "Failed to get platform dotnet API level";
-    return false;
+    if (!context_->is_readonly_package.get()) {
+      LOG(ERROR) << "Failed to get platform dotnet API level";
+      return false;
+    } else {
+      // During platform image creation stage, vconf API does not work and
+      // version check fails. This is workaround for this case.
+      return true;
+    }
   }
   if (CompareVersion(std::to_string(dotnet_api_level), version) < 0) {
     LOG(ERROR) << "Package's dotnet API level(" << version << ") is higher "