Keep removable attribute when package update 33/219733/5
authorSangyoon Jang <jeremy.jang@samsung.com>
Mon, 9 Dec 2019 12:04:58 +0000 (21:04 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 6 Feb 2020 10:29:14 +0000 (10:29 +0000)
Change-Id: I3e6bcd8103d2d5bf9a8b2c79fa36242437b86bfc
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/step/configuration/step_parse_preload.cc

index 6d5491a..bc16367 100644 (file)
@@ -64,6 +64,15 @@ ci::Step::Status StepParsePreload::process() {
     }
   }
 
+  // In case of update, keep removable value
+  if (req_type == RequestType::Update ||
+      req_type == RequestType::Delta ||
+      req_type == RequestType::MountUpdate) {
+    bool is_removable = pkg_query.IsRemovablePackage();
+    context_->manifest_data.get()->removable =
+        strdup(is_removable ? "true" : "false");
+  }
+
   const char* removable_val = context_->manifest_data.get()->removable;
   if (!removable_val || (removable_val && strlen(removable_val) == 0)) {
     if (removable_val)