1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #include "wgt/wgt_installer.h"
7 #include <common/pkgmgr_interface.h>
9 #include <common/step/backup/step_backup_icons.h>
10 #include <common/step/backup/step_backup_manifest.h>
11 #include <common/step/backup/step_copy_backup.h>
12 #include <common/step/configuration/step_block_cross_update.h>
13 #include <common/step/configuration/step_check_tizen_version.h>
14 #include <common/step/configuration/step_configure.h>
15 #include <common/step/configuration/step_fail.h>
16 #include <common/step/configuration/step_parse_manifest.h>
17 #include <common/step/configuration/step_parse_preload.h>
18 #include <common/step/filesystem/step_acquire_external_storage.h>
19 #include <common/step/filesystem/step_optional_acquire_external_storage.h>
20 #include <common/step/filesystem/step_change_owner.h>
21 #include <common/step/filesystem/step_clear_data.h>
22 #include <common/step/filesystem/step_copy.h>
23 #include <common/step/filesystem/step_copy_storage_directories.h>
24 #include <common/step/filesystem/step_copy_tep.h>
25 #include <common/step/filesystem/step_create_icons.h>
26 #include <common/step/filesystem/step_create_globalapp_symlinks.h>
27 #include <common/step/filesystem/step_create_per_user_storage_directories.h>
28 #include <common/step/filesystem/step_create_storage_directories.h>
29 #include <common/step/filesystem/step_delta_patch.h>
30 #include <common/step/filesystem/step_disable_external_mount.h>
31 #include <common/step/filesystem/step_enable_external_mount.h>
32 #include <common/step/filesystem/step_move_installed_storage.h>
33 #include <common/step/filesystem/step_recover_change_owner.h>
34 #include <common/step/filesystem/step_recover_files.h>
35 #include <common/step/filesystem/step_recover_icons.h>
36 #include <common/step/filesystem/step_recover_manifest.h>
37 #include <common/step/filesystem/step_recover_external_storage.h>
38 #include <common/step/filesystem/step_recover_storage_directories.h>
39 #include <common/step/filesystem/step_remove_files.h>
40 #include <common/step/filesystem/step_remove_icons.h>
41 #include <common/step/filesystem/step_remove_globalapp_symlinks.h>
42 #include <common/step/filesystem/step_remove_per_user_storage_directories.h>
43 #include <common/step/filesystem/step_remove_temporary_directory.h>
44 #include <common/step/filesystem/step_remove_tep.h>
45 #include <common/step/filesystem/step_remove_zip_image.h>
46 #include <common/step/filesystem/step_unzip.h>
47 #include <common/step/filesystem/step_update_tep.h>
48 #include <common/step/mount/step_mount_install.h>
49 #include <common/step/mount/step_mount_recover.h>
50 #include <common/step/mount/step_mount_unpacked.h>
51 #include <common/step/mount/step_mount_update.h>
52 #include <common/step/pkgmgr/step_check_removable.h>
53 #include <common/step/pkgmgr/step_check_restriction.h>
54 #include <common/step/pkgmgr/step_kill_apps.h>
55 #include <common/step/pkgmgr/step_recover_application.h>
56 #include <common/step/pkgmgr/step_register_app.h>
57 #include <common/step/pkgmgr/step_remove_manifest.h>
58 #include <common/step/pkgmgr/step_run_parser_plugins.h>
59 #include <common/step/pkgmgr/step_unregister_app.h>
60 #include <common/step/pkgmgr/step_update_app.h>
61 #include <common/step/pkgmgr/step_update_pkg_disable_info.h>
62 #include <common/step/rds/step_rds_modify.h>
63 #include <common/step/rds/step_rds_parse.h>
64 #include <common/step/recovery/step_open_recovery_file.h>
65 #include <common/step/security/step_check_old_certificate.h>
66 #include <common/step/security/step_check_signature.h>
67 #include <common/step/security/step_privilege_compatibility.h>
68 #include <common/step/security/step_recover_security.h>
69 #include <common/step/security/step_register_security.h>
70 #include <common/step/security/step_revoke_security.h>
71 #include <common/step/security/step_rollback_deinstallation_security.h>
72 #include <common/step/security/step_rollback_installation_security.h>
73 #include <common/step/security/step_update_security.h>
75 #include <wgt_manifest_handlers/widget_config_parser.h>
77 #include "wgt/step/configuration/step_check_rds_manifest.h"
78 #include "wgt/step/configuration/step_check_start_files.h"
79 #include "wgt/step/configuration/step_parse.h"
80 #include "wgt/step/encryption/step_encrypt_resources.h"
81 #include "wgt/step/encryption/step_remove_encryption_data.h"
82 #include "wgt/step/filesystem/step_copy_preview_icons.h"
83 #include "wgt/step/filesystem/step_create_symbolic_link.h"
84 #include "wgt/step/filesystem/step_wgt_patch_icons.h"
85 #include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
86 #include "wgt/step/filesystem/step_wgt_prepare_package_directory.h"
87 #include "wgt/step/filesystem/step_wgt_resource_directory.h"
88 #include "wgt/step/filesystem/step_wgt_update_package_directory.h"
89 #include "wgt/step/pkgmgr/step_generate_xml.h"
90 #include "wgt/step/security/step_add_default_privileges.h"
91 #include "wgt/step/security/step_check_settings_level.h"
92 #include "wgt/step/security/step_check_wgt_background_category.h"
93 #include "wgt/step/security/step_check_wgt_notification_category.h"
94 #include "wgt/step/security/step_check_wgt_ime_privilege.h"
95 #include "wgt/step/security/step_direct_manifest_check_signature.h"
96 #include "wgt/step/security/step_check_extension_privileges.h"
97 #include "wgt/step/security/step_wgt_recover_signature.h"
99 namespace ci = common_installer;
103 WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
104 : AppInstaller("wgt", pkgrmgr) {
105 context_->backend_data.set(new WgtBackendData());
107 /* treat the request */
108 switch (pkgmgr_->GetRequestType()) {
109 case ci::RequestType::Install : {
110 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
111 AddStep<ci::filesystem::StepUnzip>();
112 AddStep<wgt::configuration::StepParse>(
113 wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
114 AddStep<ci::configuration::StepParsePreload>();
115 AddStep<ci::pkgmgr::StepCheckRestriction>();
116 AddStep<ci::configuration::StepCheckTizenVersion>();
117 AddStep<ci::security::StepCheckSignature>();
118 AddStep<ci::security::StepPrivilegeCompatibility>();
119 AddStep<wgt::security::StepCheckSettingsLevel>();
120 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
121 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
122 AddStep<wgt::security::StepCheckWgtImePrivilege>();
123 AddStep<wgt::encryption::StepEncryptResources>();
124 AddStep<wgt::filesystem::StepWgtResourceDirectory>();
125 AddStep<ci::security::StepRollbackInstallationSecurity>();
126 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
127 AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
128 AddStep<ci::filesystem::StepCopy>();
129 AddStep<ci::filesystem::StepCopyTep>();
130 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
131 AddStep<ci::filesystem::StepCreateStorageDirectories>();
132 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
133 AddStep<wgt::filesystem::StepWgtPatchIcons>();
134 AddStep<ci::filesystem::StepCreateIcons>();
135 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
136 AddStep<wgt::security::StepCheckExtensionPrivileges>();
137 AddStep<wgt::pkgmgr::StepGenerateXml>();
138 AddStep<ci::pkgmgr::StepRegisterApplication>();
139 AddStep<ci::pkgmgr::StepRunParserPlugin>(
140 ci::Plugin::ActionType::Install);
141 AddStep<ci::security::StepRegisterSecurity>();
142 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
143 AddStep<ci::filesystem::StepChangeOwner>();
144 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
147 case ci::RequestType::Update: {
148 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
149 AddStep<ci::filesystem::StepUnzip>();
150 AddStep<wgt::configuration::StepParse>(
151 wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
152 AddStep<ci::configuration::StepParsePreload>();
153 AddStep<ci::configuration::StepCheckTizenVersion>();
154 AddStep<ci::security::StepCheckSignature>();
155 AddStep<ci::security::StepPrivilegeCompatibility>();
156 AddStep<wgt::security::StepCheckSettingsLevel>();
157 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
158 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
159 AddStep<wgt::security::StepCheckWgtImePrivilege>();
160 AddStep<ci::security::StepCheckOldCertificate>();
161 AddStep<wgt::encryption::StepEncryptResources>();
162 AddStep<wgt::filesystem::StepWgtResourceDirectory>();
163 AddStep<ci::configuration::StepParseManifest>(
164 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
165 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
166 AddStep<ci::configuration::StepBlockCrossUpdate>();
167 AddStep<ci::pkgmgr::StepKillApps>();
168 AddStep<ci::backup::StepBackupManifest>();
169 AddStep<ci::backup::StepBackupIcons>();
170 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
171 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
172 AddStep<ci::backup::StepCopyBackup>();
173 AddStep<ci::filesystem::StepUpdateTep>();
174 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
175 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
176 AddStep<wgt::filesystem::StepWgtPatchIcons>();
177 AddStep<ci::filesystem::StepCreateIcons>();
178 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
179 AddStep<ci::filesystem::StepCopyStorageDirectories>();
180 AddStep<wgt::security::StepCheckExtensionPrivileges>();
181 AddStep<ci::security::StepUpdateSecurity>();
182 AddStep<wgt::pkgmgr::StepGenerateXml>();
183 AddStep<ci::pkgmgr::StepRunParserPlugin>(
184 ci::Plugin::ActionType::Upgrade);
185 AddStep<ci::pkgmgr::StepUpdateApplication>();
186 AddStep<ci::filesystem::StepChangeOwner>();
187 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
190 case ci::RequestType::Uninstall: {
191 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
192 AddStep<ci::pkgmgr::StepCheckRestriction>();
193 AddStep<ci::pkgmgr::StepCheckRemovable>();
194 AddStep<ci::configuration::StepParseManifest>(
195 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
196 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
197 AddStep<ci::pkgmgr::StepKillApps>();
198 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
199 AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
200 AddStep<ci::pkgmgr::StepRunParserPlugin>(
201 ci::Plugin::ActionType::Uninstall);
202 AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
203 AddStep<ci::pkgmgr::StepUnregisterApplication>();
204 AddStep<ci::security::StepRollbackDeinstallationSecurity>();
205 AddStep<ci::filesystem::StepRemoveTep>();
206 AddStep<ci::filesystem::StepRemoveFiles>();
207 AddStep<ci::filesystem::StepRemoveZipImage>();
208 AddStep<ci::filesystem::StepRemoveIcons>();
209 AddStep<wgt::encryption::StepRemoveEncryptionData>();
210 AddStep<ci::security::StepRevokeSecurity>();
211 AddStep<ci::pkgmgr::StepRemoveManifest>();
212 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
215 case ci::RequestType::Reinstall: {
216 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
217 AddStep<wgt::configuration::StepCheckRDSManifest>();
218 AddStep<wgt::configuration::StepParse>(
219 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, false);
220 AddStep<ci::pkgmgr::StepCheckRestriction>();
221 AddStep<ci::configuration::StepCheckTizenVersion>();
222 AddStep<ci::pkgmgr::StepKillApps>();
223 AddStep<ci::configuration::StepParseManifest>(
224 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
225 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
226 AddStep<ci::configuration::StepBlockCrossUpdate>();
227 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
228 AddStep<ci::rds::StepRDSParse>();
229 AddStep<ci::filesystem::StepUpdateTep>();
230 AddStep<ci::rds::StepRDSModify>();
231 AddStep<wgt::security::StepCheckExtensionPrivileges>();
232 AddStep<ci::security::StepUpdateSecurity>();
233 AddStep<ci::filesystem::StepChangeOwner>();
234 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
237 case ci::RequestType::Delta: {
238 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
239 AddStep<ci::filesystem::StepUnzip>();
240 AddStep<wgt::configuration::StepParse>(
241 wgt::configuration::StepParse::ConfigLocation::PACKAGE, false);
242 AddStep<ci::configuration::StepParseManifest>(
243 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
244 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
245 AddStep<ci::configuration::StepCheckTizenVersion>();
246 AddStep<ci::filesystem::StepEnableExternalMount>();
247 AddStep<ci::filesystem::StepDeltaPatch>("res/wgt/");
248 AddStep<ci::filesystem::StepDisableExternalMount>();
249 AddStep<wgt::configuration::StepCheckStartFiles>();
250 AddStep<ci::security::StepCheckSignature>();
251 AddStep<ci::security::StepPrivilegeCompatibility>();
252 AddStep<wgt::security::StepCheckSettingsLevel>();
253 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
254 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
255 AddStep<wgt::security::StepCheckWgtImePrivilege>();
256 AddStep<ci::security::StepCheckOldCertificate>();
257 AddStep<wgt::encryption::StepEncryptResources>();
258 AddStep<wgt::filesystem::StepWgtResourceDirectory>();
259 AddStep<ci::configuration::StepBlockCrossUpdate>();
260 AddStep<ci::pkgmgr::StepKillApps>();
261 AddStep<ci::backup::StepBackupManifest>();
262 AddStep<ci::backup::StepBackupIcons>();
263 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
264 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
265 AddStep<ci::backup::StepCopyBackup>();
266 AddStep<ci::filesystem::StepUpdateTep>();
267 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
268 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
269 AddStep<wgt::filesystem::StepWgtPatchIcons>();
270 AddStep<ci::filesystem::StepCreateIcons>();
271 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
272 AddStep<ci::filesystem::StepCopyStorageDirectories>();
273 AddStep<wgt::security::StepCheckExtensionPrivileges>();
274 AddStep<ci::security::StepUpdateSecurity>();
275 AddStep<wgt::pkgmgr::StepGenerateXml>();
276 AddStep<ci::pkgmgr::StepRunParserPlugin>(
277 ci::Plugin::ActionType::Upgrade);
278 AddStep<ci::pkgmgr::StepUpdateApplication>();
279 AddStep<ci::filesystem::StepChangeOwner>();
280 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
283 case ci::RequestType::Recovery: {
284 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
285 AddStep<ci::recovery::StepOpenRecoveryFile>();
286 AddStep<ci::configuration::StepParseManifest>(
287 ci::configuration::StepParseManifest::ManifestLocation::RECOVERY,
288 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
289 AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
290 AddStep<ci::filesystem::StepRecoverIcons>();
291 AddStep<ci::filesystem::StepRecoverManifest>();
292 AddStep<ci::filesystem::StepRecoverExternalStorage>();
293 AddStep<ci::filesystem::StepRecoverStorageDirectories>();
294 AddStep<ci::filesystem::StepRecoverFiles>();
295 AddStep<ci::mount::StepMountRecover>();
296 AddStep<wgt::security::StepWgtRecoverSignature>();
297 AddStep<ci::pkgmgr::StepRecoverApplication>();
298 AddStep<ci::filesystem::StepRecoverChangeOwner>();
299 AddStep<ci::security::StepRecoverSecurity>();
302 case ci::RequestType::Clear: {
303 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
304 AddStep<ci::configuration::StepParseManifest>(
305 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
306 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
307 AddStep<ci::filesystem::StepClearData>();
310 case ci::RequestType::MountInstall: {
311 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
312 AddStep<ci::mount::StepMountUnpacked>();
313 AddStep<wgt::configuration::StepParse>(
314 wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
315 AddStep<ci::configuration::StepParsePreload>();
316 AddStep<ci::pkgmgr::StepCheckRestriction>();
317 AddStep<ci::configuration::StepCheckTizenVersion>();
318 AddStep<ci::security::StepCheckSignature>();
319 AddStep<ci::security::StepPrivilegeCompatibility>();
320 AddStep<wgt::security::StepCheckSettingsLevel>();
321 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
322 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
323 AddStep<wgt::security::StepCheckWgtImePrivilege>();
324 AddStep<wgt::encryption::StepEncryptResources>();
325 AddStep<ci::security::StepRollbackInstallationSecurity>();
326 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
327 AddStep<ci::mount::StepMountInstall>();
328 AddStep<wgt::filesystem::StepWgtPreparePackageDirectory>();
329 AddStep<ci::filesystem::StepCopyTep>();
330 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
331 AddStep<ci::filesystem::StepCreateStorageDirectories>();
332 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
333 AddStep<wgt::filesystem::StepWgtPatchIcons>();
334 AddStep<ci::filesystem::StepCreateIcons>();
335 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
336 AddStep<wgt::pkgmgr::StepGenerateXml>();
337 AddStep<ci::pkgmgr::StepRegisterApplication>();
338 AddStep<ci::pkgmgr::StepRunParserPlugin>(
339 ci::Plugin::ActionType::Install);
340 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
341 AddStep<wgt::security::StepCheckExtensionPrivileges>();
342 AddStep<ci::security::StepRegisterSecurity>();
343 AddStep<ci::filesystem::StepChangeOwner>();
344 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
347 case ci::RequestType::MountUpdate: {
348 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
349 AddStep<ci::mount::StepMountUnpacked>();
350 AddStep<wgt::configuration::StepParse>(
351 wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
352 AddStep<ci::configuration::StepParsePreload>();
353 AddStep<ci::configuration::StepCheckTizenVersion>();
354 AddStep<ci::security::StepCheckSignature>();
355 AddStep<ci::security::StepPrivilegeCompatibility>();
356 AddStep<wgt::security::StepCheckSettingsLevel>();
357 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
358 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
359 AddStep<wgt::security::StepCheckWgtImePrivilege>();
360 AddStep<ci::security::StepCheckOldCertificate>();
361 AddStep<ci::configuration::StepParseManifest>(
362 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
363 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
364 AddStep<ci::configuration::StepBlockCrossUpdate>();
365 AddStep<ci::pkgmgr::StepKillApps>();
366 AddStep<ci::backup::StepBackupManifest>();
367 AddStep<ci::backup::StepBackupIcons>();
368 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
369 AddStep<ci::mount::StepMountUpdate>();
370 AddStep<wgt::filesystem::StepWgtUpdatePackageDirectory>();
371 AddStep<ci::filesystem::StepUpdateTep>();
372 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
373 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
374 AddStep<wgt::filesystem::StepWgtPatchIcons>();
375 AddStep<ci::filesystem::StepCreateIcons>();
376 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
377 AddStep<wgt::security::StepCheckExtensionPrivileges>();
378 AddStep<ci::security::StepUpdateSecurity>();
379 AddStep<wgt::pkgmgr::StepGenerateXml>();
380 AddStep<ci::pkgmgr::StepRunParserPlugin>(
381 ci::Plugin::ActionType::Upgrade);
382 AddStep<ci::pkgmgr::StepUpdateApplication>();
383 AddStep<ci::filesystem::StepChangeOwner>();
384 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
387 case ci::RequestType::ManifestDirectInstall: {
388 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
389 AddStep<wgt::configuration::StepParse>(
390 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
391 AddStep<ci::configuration::StepParsePreload>();
392 AddStep<ci::configuration::StepCheckTizenVersion>();
393 AddStep<wgt::security::StepDirectManifestCheckSignature>();
394 AddStep<ci::security::StepPrivilegeCompatibility>();
395 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
396 AddStep<wgt::security::StepCheckWgtImePrivilege>();
397 AddStep<wgt::security::StepCheckSettingsLevel>();
398 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
399 AddStep<ci::security::StepRollbackInstallationSecurity>();
400 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
401 AddStep<wgt::filesystem::StepWgtPatchIcons>();
402 AddStep<wgt::pkgmgr::StepGenerateXml>();
403 AddStep<ci::pkgmgr::StepRegisterApplication>();
404 AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
405 AddStep<ci::security::StepRegisterSecurity>();
406 AddStep<ci::filesystem::StepChangeOwner>();
407 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
410 case ci::RequestType::ManifestDirectUpdate: {
411 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
412 AddStep<wgt::configuration::StepParse>(
413 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
414 AddStep<ci::configuration::StepParsePreload>();
415 AddStep<ci::configuration::StepCheckTizenVersion>();
416 AddStep<wgt::security::StepDirectManifestCheckSignature>();
417 AddStep<ci::security::StepPrivilegeCompatibility>();
418 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
419 AddStep<wgt::security::StepCheckWgtImePrivilege>();
420 AddStep<wgt::security::StepCheckSettingsLevel>();
421 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
422 AddStep<ci::configuration::StepParseManifest>(
423 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
424 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
425 AddStep<ci::pkgmgr::StepKillApps>();
426 AddStep<ci::filesystem::StepCopyTep>();
427 AddStep<ci::security::StepUpdateSecurity>();
428 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
429 AddStep<wgt::filesystem::StepWgtPatchIcons>();
430 AddStep<wgt::pkgmgr::StepGenerateXml>();
431 AddStep<ci::pkgmgr::StepRunParserPlugin>(
432 ci::Plugin::ActionType::Upgrade);
433 AddStep<ci::pkgmgr::StepUpdateApplication>();
434 AddStep<ci::filesystem::StepChangeOwner>();
435 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
438 case ci::RequestType::Move: {
439 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
440 AddStep<ci::configuration::StepParseManifest>(
441 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
442 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
443 AddStep<ci::pkgmgr::StepKillApps>();
444 AddStep<ci::filesystem::StepMoveInstalledStorage>();
445 AddStep<ci::security::StepRegisterSecurity>();
448 case ci::RequestType::EnablePkg: {
449 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
450 AddStep<ci::configuration::StepParseManifest>(
451 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
452 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
453 AddStep<ci::pkgmgr::StepKillApps>();
454 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
455 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable);
456 AddStep<ci::pkgmgr::StepRunParserPlugin>(
457 ci::Plugin::ActionType::Uninstall);
460 case ci::RequestType::DisablePkg: {
461 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
462 AddStep<ci::configuration::StepParseManifest>(
463 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
464 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
465 AddStep<ci::pkgmgr::StepKillApps>();
466 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
467 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
468 AddStep<ci::pkgmgr::StepRunParserPlugin>(
469 ci::Plugin::ActionType::Uninstall);
473 AddStep<ci::configuration::StepFail>();