Set exec permission only for tpk apps in StepCreateSymbolicLink 04/58104/2
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 27 Jan 2016 12:17:40 +0000 (13:17 +0100)
committerTomasz Iwanek <t.iwanek@samsung.com>
Thu, 28 Jan 2016 08:38:22 +0000 (09:38 +0100)
Change-Id: I8d9e7bd296222129fca45baf9259c0a597a76795

src/tpk/step/step_create_symbolic_link.cc
src/tpk/step/step_create_symbolic_link.h

index 60887df99d804618180ebb5558d07e90b2eefb8d..f4e3353241d14a281334e0bbb53cf8cac6d39024 100644 (file)
@@ -81,31 +81,15 @@ Status StepCreateSymbolicLink::precheck() {
 Status StepCreateSymbolicLink::process() {
   manifest_x* m = context_->manifest_data.get();
   for (application_x* app : GListRange<application_x*>(m->application)) {
-    if (!SetExecPermission(app))
-      return Status::ERROR;
     // filter out non-tpk apps as this step is run for hybrid backend too
-    if (strcmp("capp", app->type) != 0)
+    if (strcmp("capp", app->type) != 0 && strcmp("jsapp", app->type) != 0)
       continue;
     if (!CreateSymLink(app, context_))
       return Status::ERROR;
-  }
-  return Status::OK;
-}
-
-
-Status StepCreateSymbolicLink::undo() {
-  manifest_x* m = context_->manifest_data.get();
-  Step::Status ret = Status::OK;
-  for (application_x* app : GListRange<application_x*>(m->application)) {
     if (!SetExecPermission(app))
       return Status::ERROR;
-    // filter out non-tpk apps as this step is run for hybrid backend too
-    if (strcmp("capp", app->type) != 0)
-      continue;
-    if (!CreateSymLink(app, context_))
-      ret = Status::ERROR;
   }
-  return ret;
+  return Status::OK;
 }
 
 }  // namespace filesystem
index fc1cad9d3a954e5c50fee4559b80958283046bf6..999dbe1d96a95ca655d248fd64470ddab4a03ae5 100644 (file)
@@ -14,7 +14,7 @@ class StepCreateSymbolicLink : public common_installer::Step {
   using Step::Step;
   Status process() override;
   Status clean() override { return Status::OK; }
-  Status undo() override;
+  Status undo() override { return Status::OK; }
   Status precheck() override;
 
   SCOPE_LOG_TAG(SymbolicLink)