#include "common/step/filesystem/step_copy_tep.h"
#include "common/step/filesystem/step_create_globalapp_symlinks.h"
#include "common/step/filesystem/step_create_icons.h"
+#include "common/step/filesystem/step_create_res_control_directories.h"
#include "common/step/filesystem/step_create_storage_directories.h"
#include "common/step/filesystem/step_delta_patch.h"
#include "common/step/filesystem/step_disable_external_mount.h"
#include "common/step/pkgmgr/step_recover_application.h"
#include "common/step/pkgmgr/step_recover_parser_plugins.h"
#include "common/step/pkgmgr/step_register_app.h"
+#include "common/step/pkgmgr/step_recover_priv_sharedres.h"
#include "common/step/pkgmgr/step_remove_manifest.h"
+#include "common/step/pkgmgr/step_remove_priv_sharedres.h"
#include "common/step/pkgmgr/step_run_parser_plugins.h"
#include "common/step/pkgmgr/step_unregister_app.h"
#include "common/step/pkgmgr/step_update_app.h"
// pkgmgr signal should work only for online mode
// there is no one to receive it in offline mode
if (context_->installation_mode.get() == InstallationMode::ONLINE) {
- pi_ = pkgmgr->CreatePkgmgrSignal();
+ ps_ = pkgmgr->CreatePkgmgrSignal();
}
}
Process();
if (it_ != steps_.end() && result_ == Result::ERROR) {
LOG(ERROR) << "Failure occurs in step: " << (*it_)->name();
- pkgmgr_parser_clear_cache_memory_db();
Undo();
} else {
- pkgmgr_parser_clear_cache_memory_db();
Clean();
}
sync();
if (status_ != Step::Status::OK) {
if (status_ != Step::Status::RECOVERY_DONE) {
- LOG(ERROR) << "Error during processing";
+ LOG(ERROR) << "Error during processing(" << (*it_)->name() << ")";
result_ = Result::ERROR;
}
break;
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::filesystem::StepCreateIcons>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::filesystem::StepCopyStorageDirectories>();
AddStep<ci::filesystem::StepCreateIcons>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::security::StepPrivacyPrivilege>(
ci::security::StepPrivacyPrivilege::ActionType::Uninstall);
AddStep<ci::filesystem::StepRemoveFiles>();
+ AddStep<ci::pkgmgr::StepRemovePrivSharedres>();
AddStep<ci::filesystem::StepRemoveZipImage>();
AddStep<ci::filesystem::StepRemoveIcons>();
AddStep<ci::filesystem::StepRemoveTep>();
AddStep<ci::rds::StepRDSModify>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::filesystem::StepCreateIcons>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::filesystem::StepCopyStorageDirectories>();
AddStep<ci::filesystem::StepCreateIcons>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::filesystem::StepRecoverStorageDirectories>();
AddStep<ci::filesystem::StepRecoverGlobalAppSymlinks>();
AddStep<ci::filesystem::StepRecoverFiles>();
+ AddStep<ci::pkgmgr::StepRecoverPrivSharedres>();
AddStep<ci::mount::StepMountRecover>();
AddStep<ci::filesystem::StepRecoverChangeOwner>();
AddStep<ci::pkgmgr::StepRecoverApplication>();
AddStep<ci::security::StepSignature>(true);
AddStep<ci::security::StepRollbackInstallationSecurity>();
AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepCheckOldCertificate>();
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
+ AddStep<ci::pkgmgr::StepRemovePrivSharedres>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<ci::security::StepUnregisterTrustAnchor>();
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::filesystem::StepCreateIcons>();
+ AddStep<ci::filesystem::StepCreateResControlDirectories>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<ci::security::StepPrivacyPrivilege>(
ci::security::StepPrivacyPrivilege::ActionType::Update);
AddStep<ci::filesystem::StepRemoveFiles>();
+ AddStep<ci::pkgmgr::StepRemovePrivSharedres>();
AddStep<ci::filesystem::StepRemoveZipImage>();
AddStep<ci::filesystem::StepRemoveIcons>();
AddStep<ci::filesystem::StepRemoveTep>();
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
AddStep<ci::pkgmgr::StepKillApps>();
+ AddStep<ci::pkgmgr::StepRemovePrivSharedres>();
AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
void AppInstaller::HandleStepError(Step::Status result,
const std::string& error) {
- if (!pi_)
+ if (!ps_)
return;
- pi_->SendError(result, error, context_->pkg_type.get(),
+ ps_->SendError(result, error, context_->pkg_type.get(),
context_->pkgid.get());
}
}
bool AppInstaller::SendStartIfNotSent(bool is_skippable) {
- if (!pi_)
+ if (!ps_)
return false;
- if (pi_->state() != PkgmgrSignal::State::NOT_SENT)
+ if (ps_->state() != PkgmgrSignal::State::NOT_SENT)
return true;
if (context_->pkgid.get().empty() && is_skippable)
return true;
// set request type before sending start signal
- pi_->SetRequestType(context_->request_type.get());
- pi_->SendStarted(context_->pkg_type.get(), context_->pkgid.get());
+ ps_->SetRequestType(context_->request_type.get());
+ ps_->SendStarted(context_->pkg_type.get(), context_->pkgid.get());
return true;
}
return;
// send installation progress
- pi_->SendProgress(progress,
+ ps_->SendProgress(progress,
context_->pkg_type.get(), context_->pkgid.get());
}
void AppInstaller::SendFinished(Step::Status process_status) {
+ pkgmgr_parser_clear_cache_memory_db();
+
if (!SendStartIfNotSent(false))
return;
- pi_->SendFinished(process_status,
+ ps_->SendFinished(process_status,
context_->pkg_type.get(),
context_->pkgid.get());
}