Fix logic of 'update' attribute 59/133659/2 accepted/tizen/3.0/common/20170619.133414 accepted/tizen/3.0/ivi/20170619.075731 accepted/tizen/3.0/mobile/20170619.075641 accepted/tizen/3.0/tv/20170619.075658 accepted/tizen/3.0/wearable/20170619.075715 submit/tizen_3.0/20170616.060706
authorjongmyeongko <jongmyeong.ko@samsung.com>
Wed, 24 May 2017 12:35:05 +0000 (21:35 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Wed, 14 Jun 2017 01:29:38 +0000 (01:29 +0000)
Requires and Refer to:
        https://review.tizen.org/gerrit/#/c/133657/

Change-Id: I408ec32d9cabd161217e4a462188c27e6366d712
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
(cherry picked from commit 3a9647cc8e8e639dd2dc52ed3e8fd4b1e4979299)

src/wgt/step/configuration/step_parse.cc

index d9a96ba..b68a733 100644 (file)
@@ -274,12 +274,14 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) {
 
   // set update true if package is updated preload package
   ci::RequestType req_type = context_->request_type.get();
-  if (req_type == ci::RequestType::ReadonlyUpdateInstall)
+  if (ci::QueryIsUpdatedPackage(context_->pkgid.get(), context_->uid.get()))
     manifest->update = strdup("true");
-  else if (req_type == ci::RequestType::ReadonlyUpdateUninstall)
-    manifest->update = strdup("false");
-  else if (ci::QueryIsUpdatedReadonlyPackage(context_->pkgid.get(),
-      context_->uid.get()))
+  else if (ci::QueryIsPreloadPackage(context_->pkgid.get(),
+      context_->uid.get()) &&
+          (req_type == ci::RequestType::Update ||
+           req_type == ci::RequestType::Delta ||
+           req_type == ci::RequestType::MountUpdate ||
+           req_type == ci::RequestType::ReadonlyUpdateInstall))
     manifest->update = strdup("true");
   else
     manifest->update = strdup("false");