add and fix step for fota and direct install 72/87472/3 accepted/tizen/common/20160909.115059 accepted/tizen/ivi/20160909.122431 accepted/tizen/mobile/20160909.122336 accepted/tizen/tv/20160909.122353 accepted/tizen/wearable/20160909.122414 submit/tizen/20160909.054902 submit/tizen/20160909.060412
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 8 Sep 2016 07:07:32 +0000 (16:07 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 9 Sep 2016 01:35:30 +0000 (10:35 +0900)
- Add StepWgtPatchIcons at ManifestDirectInstall and Update to work it properly
- Fix StepWgtPatchIcons to overwrite icon even exists

Related changes
[pkgmgr-tool] : https://review.tizen.org/gerrit/#/c/83327/
[app-installers] : https://review.tizen.org/gerrit/#/c/86789/
[tpk-backend] : https://review.tizen.org/gerrit/#/c/86846/

Change-Id: I9a13d6af490832e0a48fd8e837a7bc29aeb60648
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/wgt/step/filesystem/step_wgt_patch_icons.cc
src/wgt/wgt_installer.cc

index 01b62fd..c01c1c8 100644 (file)
@@ -60,7 +60,7 @@ common_installer::Step::Status StepWgtPatchIcons::process() {
       // create default icon if there is no icon at all
       bf::path icon_path = common_icon_location / app->appid;
       icon_path += ".png";
-      bf::copy_file(kDefaultIconPath, icon_path, error);
+      bf::copy_file(kDefaultIconPath, icon_path, bf::copy_option::overwrite_if_exists, error);
       if (error) {
         LOG(ERROR) << "Failed to create default icon for web application";
         return Status::ICON_ERROR;
index d137fab..59cfa91 100755 (executable)
@@ -395,6 +395,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
       AddStep<ci::security::StepRollbackInstallationSecurity>();
       AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepRegisterApplication>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
@@ -422,6 +423,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::filesystem::StepCopyTep>();
       AddStep<ci::security::StepUpdateSecurity>();
       AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepRunParserPlugin>(
           ci::Plugin::ActionType::Upgrade);