Add StepChangeOwner for HybridInstaller 87/84187/4 accepted/tizen/common/20160829.135936 accepted/tizen/common/20160830.150147 accepted/tizen/ivi/20160830.061217 accepted/tizen/mobile/20160830.060941 accepted/tizen/tv/20160830.061046 accepted/tizen/wearable/20160830.061131 submit/tizen/20160829.010716 submit/tizen/20160830.010724
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 17 Aug 2016 08:06:08 +0000 (10:06 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 26 Aug 2016 14:31:40 +0000 (07:31 -0700)
Complementary changes to: https://review.tizen.org/gerrit/#/c/84185/

To verify, install hybrid package and check that files of installed package
have owner's ownership.

Change-Id: I8a644be5567acd1a6ce800225cb9050043c32f76

src/hybrid/hybrid_installer.cc

index 9099883..00bfcb3 100644 (file)
@@ -15,6 +15,7 @@
 #include <common/step/configuration/step_parse_preload.h>
 #include <common/step/filesystem/step_acquire_external_storage.h>
 #include <common/step/filesystem/step_clear_data.h>
+#include <common/step/filesystem/step_change_owner.h>
 #include <common/step/filesystem/step_copy.h>
 #include <common/step/filesystem/step_copy_storage_directories.h>
 #include <common/step/filesystem/step_copy_tep.h>
@@ -132,6 +133,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepRegisterApplication>();
       AddStep<ci::security::StepRegisterSecurity>();
       AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::Update:
@@ -178,6 +180,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(
           ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::Uninstall:
@@ -254,6 +257,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(
           ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::Recovery:
@@ -318,6 +322,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepRegisterApplication>();
       AddStep<ci::security::StepRegisterSecurity>();
       AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::MountUpdate:
@@ -363,6 +368,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(
           ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::ManifestDirectInstall:
@@ -388,6 +394,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepRegisterApplication>();
       AddStep<ci::security::StepRegisterSecurity>();
       AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::ManifestDirectUpdate:
@@ -417,6 +424,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(
           ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::filesystem::StepChangeOwner>();
       AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
       break;
     case ci::RequestType::EnablePkg: