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 "hybrid/hybrid_installer.h"
7 #include <common/privileges.h>
8 #include <common/step/backup/step_backup_icons.h>
9 #include <common/step/backup/step_backup_manifest.h>
10 #include <common/step/backup/step_copy_backup.h>
11 #include <common/step/configuration/step_block_cross_update.h>
12 #include <common/step/configuration/step_check_tizen_version.h>
13 #include <common/step/configuration/step_configure.h>
14 #include <common/step/configuration/step_fail.h>
15 #include <common/step/configuration/step_parse_manifest.h>
16 #include <common/step/configuration/step_parse_preload.h>
17 #include <common/step/filesystem/step_acquire_external_storage.h>
18 #include <common/step/filesystem/step_optional_acquire_external_storage.h>
19 #include <common/step/filesystem/step_clear_data.h>
20 #include <common/step/filesystem/step_change_owner.h>
21 #include <common/step/filesystem/step_copy.h>
22 #include <common/step/filesystem/step_copy_storage_directories.h>
23 #include <common/step/filesystem/step_copy_tep.h>
24 #include <common/step/filesystem/step_create_icons.h>
25 #include <common/step/filesystem/step_create_globalapp_symlinks.h>
26 #include <common/step/filesystem/step_create_per_user_storage_directories.h>
27 #include <common/step/filesystem/step_create_storage_directories.h>
28 #include <common/step/filesystem/step_delta_patch.h>
29 #include <common/step/filesystem/step_disable_external_mount.h>
30 #include <common/step/filesystem/step_enable_external_mount.h>
31 #include <common/step/filesystem/step_recover_change_owner.h>
32 #include <common/step/filesystem/step_recover_files.h>
33 #include <common/step/filesystem/step_recover_icons.h>
34 #include <common/step/filesystem/step_recover_manifest.h>
35 #include <common/step/filesystem/step_recover_external_storage.h>
36 #include <common/step/filesystem/step_recover_storage_directories.h>
37 #include <common/step/filesystem/step_remove_files.h>
38 #include <common/step/filesystem/step_remove_icons.h>
39 #include <common/step/filesystem/step_remove_globalapp_symlinks.h>
40 #include <common/step/filesystem/step_remove_per_user_storage_directories.h>
41 #include <common/step/filesystem/step_remove_temporary_directory.h>
42 #include <common/step/filesystem/step_remove_zip_image.h>
43 #include <common/step/filesystem/step_remove_tep.h>
44 #include <common/step/filesystem/step_unzip.h>
45 #include <common/step/filesystem/step_update_tep.h>
46 #include <common/step/mount/step_mount_install.h>
47 #include <common/step/mount/step_mount_unpacked.h>
48 #include <common/step/mount/step_mount_recover.h>
49 #include <common/step/mount/step_mount_update.h>
50 #include <common/step/pkgmgr/step_check_installable.h>
51 #include <common/step/pkgmgr/step_check_removable.h>
52 #include <common/step/pkgmgr/step_check_restriction.h>
53 #include <common/step/pkgmgr/step_kill_apps.h>
54 #include <common/step/pkgmgr/step_recover_application.h>
55 #include <common/step/pkgmgr/step_register_app.h>
56 #include <common/step/pkgmgr/step_remove_manifest.h>
57 #include <common/step/pkgmgr/step_run_parser_plugins.h>
58 #include <common/step/pkgmgr/step_unregister_app.h>
59 #include <common/step/pkgmgr/step_update_app.h>
60 #include <common/step/pkgmgr/step_update_pkg_disable_info.h>
61 #include <common/step/recovery/step_open_recovery_file.h>
62 #include <common/step/security/step_check_signature.h>
63 #include <common/step/security/step_privilege_compatibility.h>
64 #include <common/step/security/step_recover_security.h>
65 #include <common/step/security/step_register_security.h>
66 #include <common/step/security/step_revoke_security.h>
67 #include <common/step/security/step_rollback_deinstallation_security.h>
68 #include <common/step/security/step_rollback_installation_security.h>
69 #include <common/step/security/step_update_security.h>
71 #include <tpk/step/filesystem/step_create_symbolic_link.h>
72 #include <tpk/step/filesystem/step_tpk_patch_icons.h>
73 #include <tpk/step/filesystem/step_tpk_prepare_package_directory.h>
74 #include <tpk/step/filesystem/step_tpk_update_package_directory.h>
75 #include <tpk/step/security/step_tpk_recover_signature.h>
77 #include "hybrid/hybrid_backend_data.h"
78 #include "hybrid/step/configuration/step_merge_tpk_config.h"
79 #include "hybrid/step/configuration/step_stash_tpk_config.h"
80 #include "hybrid/step/encryption/step_encrypt_resources.h"
81 #include "wgt/step/configuration/step_parse.h"
82 #include "wgt/step/encryption/step_remove_encryption_data.h"
83 #include "wgt/step/filesystem/step_copy_preview_icons.h"
84 #include "wgt/step/filesystem/step_create_symbolic_link.h"
85 #include "wgt/step/filesystem/step_wgt_patch_icons.h"
86 #include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
87 #include "wgt/step/pkgmgr/step_generate_xml.h"
88 #include "wgt/step/security/step_check_settings_level.h"
89 #include "wgt/step/security/step_check_wgt_background_category.h"
90 #include "wgt/step/security/step_check_wgt_notification_category.h"
91 #include "wgt/step/security/step_check_wgt_ime_privilege.h"
93 namespace ci = common_installer;
97 HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
98 : AppInstaller("wgt", pkgmgr) {
99 context_->cross_app_rules.set(true);
100 context_->backend_data.set(new HybridBackendData());
102 switch (pkgmgr_->GetRequestType()) {
103 case ci::RequestType::Install:
104 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
105 AddStep<ci::filesystem::StepUnzip>();
106 AddStep<ci::configuration::StepParseManifest>(
107 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
108 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
109 AddStep<ci::pkgmgr::StepCheckInstallable>();
110 AddStep<hybrid::configuration::StepStashTpkConfig>();
111 AddStep<wgt::configuration::StepParse>(
112 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
113 AddStep<hybrid::configuration::StepMergeTpkConfig>();
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 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
120 AddStep<wgt::security::StepCheckSettingsLevel>();
121 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
122 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
123 AddStep<wgt::security::StepCheckWgtImePrivilege>();
124 AddStep<hybrid::encryption::StepEncryptResources>();
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<tpk::filesystem::StepTpkPatchIcons>();
131 AddStep<wgt::filesystem::StepWgtPatchIcons>();
132 AddStep<ci::filesystem::StepCreateIcons>();
133 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
134 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
135 AddStep<ci::filesystem::StepCreateStorageDirectories>();
136 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
137 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
138 AddStep<wgt::pkgmgr::StepGenerateXml>();
139 AddStep<ci::security::StepRegisterSecurity>();
140 AddStep<ci::pkgmgr::StepRegisterApplication>();
141 AddStep<ci::pkgmgr::StepRunParserPlugin>(
142 ci::Plugin::ActionType::Install);
143 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
144 AddStep<ci::filesystem::StepChangeOwner>();
145 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
147 case ci::RequestType::Update:
148 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
149 AddStep<ci::filesystem::StepUnzip>();
150 AddStep<ci::configuration::StepParseManifest>(
151 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
152 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
153 AddStep<hybrid::configuration::StepStashTpkConfig>();
154 AddStep<wgt::configuration::StepParse>(
155 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
156 AddStep<hybrid::configuration::StepMergeTpkConfig>();
157 AddStep<ci::configuration::StepParsePreload>();
158 AddStep<ci::configuration::StepCheckTizenVersion>();
159 AddStep<ci::security::StepCheckSignature>();
160 AddStep<ci::security::StepPrivilegeCompatibility>(
161 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
162 AddStep<wgt::security::StepCheckSettingsLevel>();
163 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
164 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
165 AddStep<wgt::security::StepCheckWgtImePrivilege>();
166 AddStep<hybrid::encryption::StepEncryptResources>();
167 AddStep<ci::configuration::StepParseManifest>(
168 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
169 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
170 AddStep<ci::configuration::StepBlockCrossUpdate>();
171 AddStep<ci::pkgmgr::StepKillApps>();
172 AddStep<ci::backup::StepBackupManifest>();
173 AddStep<ci::backup::StepBackupIcons>();
174 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
175 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
176 AddStep<ci::backup::StepCopyBackup>();
177 AddStep<ci::filesystem::StepUpdateTep>();
178 AddStep<tpk::filesystem::StepTpkPatchIcons>();
179 AddStep<wgt::filesystem::StepWgtPatchIcons>();
180 AddStep<ci::filesystem::StepCreateIcons>();
181 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
182 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
183 AddStep<ci::filesystem::StepCopyStorageDirectories>();
184 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
185 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
186 AddStep<ci::security::StepUpdateSecurity>();
187 AddStep<wgt::pkgmgr::StepGenerateXml>();
188 AddStep<ci::pkgmgr::StepUpdateApplication>();
189 AddStep<ci::pkgmgr::StepRunParserPlugin>(
190 ci::Plugin::ActionType::Upgrade);
191 AddStep<ci::filesystem::StepChangeOwner>();
192 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
194 case ci::RequestType::Uninstall:
195 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
196 AddStep<ci::pkgmgr::StepCheckRestriction>();
197 AddStep<ci::pkgmgr::StepCheckRemovable>();
198 AddStep<ci::configuration::StepParseManifest>(
199 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
200 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
201 AddStep<ci::pkgmgr::StepRunParserPlugin>(
202 ci::Plugin::ActionType::Uninstall);
203 AddStep<ci::pkgmgr::StepKillApps>();
204 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
205 AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
206 AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
207 AddStep<ci::pkgmgr::StepUnregisterApplication>();
208 AddStep<ci::security::StepRollbackDeinstallationSecurity>();
209 AddStep<ci::filesystem::StepRemoveTep>();
210 AddStep<ci::filesystem::StepRemoveFiles>();
211 AddStep<ci::filesystem::StepRemoveZipImage>();
212 AddStep<ci::filesystem::StepRemoveIcons>();
213 AddStep<wgt::encryption::StepRemoveEncryptionData>();
214 AddStep<ci::security::StepRevokeSecurity>();
215 AddStep<ci::pkgmgr::StepRemoveManifest>();
216 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
218 case ci::RequestType::Reinstall:
219 // RDS is not supported for hybrid apps
220 AddStep<ci::configuration::StepFail>();
222 case ci::RequestType::Delta:
223 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
224 AddStep<ci::filesystem::StepUnzip>();
225 AddStep<ci::configuration::StepParseManifest>(
226 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
227 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
228 AddStep<hybrid::configuration::StepStashTpkConfig>();
229 AddStep<ci::configuration::StepParseManifest>(
230 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
231 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
232 AddStep<ci::filesystem::StepEnableExternalMount>();
233 AddStep<ci::filesystem::StepDeltaPatch>();
234 AddStep<ci::filesystem::StepDisableExternalMount>();
235 AddStep<wgt::configuration::StepParse>(
236 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
237 AddStep<hybrid::configuration::StepMergeTpkConfig>();
238 AddStep<ci::configuration::StepParsePreload>();
239 AddStep<ci::configuration::StepCheckTizenVersion>();
240 AddStep<ci::security::StepCheckSignature>();
241 AddStep<ci::security::StepPrivilegeCompatibility>(
242 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
243 AddStep<wgt::security::StepCheckSettingsLevel>();
244 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
245 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
246 AddStep<wgt::security::StepCheckWgtImePrivilege>();
247 AddStep<hybrid::encryption::StepEncryptResources>();
248 AddStep<ci::security::StepRollbackInstallationSecurity>();
249 AddStep<ci::configuration::StepBlockCrossUpdate>();
250 AddStep<ci::pkgmgr::StepKillApps>();
251 AddStep<ci::backup::StepBackupManifest>();
252 AddStep<ci::backup::StepBackupIcons>();
253 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
254 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
255 AddStep<ci::backup::StepCopyBackup>();
256 AddStep<ci::filesystem::StepUpdateTep>();
257 AddStep<tpk::filesystem::StepTpkPatchIcons>();
258 AddStep<wgt::filesystem::StepWgtPatchIcons>();
259 AddStep<ci::filesystem::StepCreateIcons>();
260 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
261 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
262 AddStep<ci::filesystem::StepCopyStorageDirectories>();
263 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
264 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
265 AddStep<ci::security::StepUpdateSecurity>();
266 AddStep<wgt::pkgmgr::StepGenerateXml>();
267 AddStep<ci::pkgmgr::StepUpdateApplication>();
268 AddStep<ci::pkgmgr::StepRunParserPlugin>(
269 ci::Plugin::ActionType::Upgrade);
270 AddStep<ci::filesystem::StepChangeOwner>();
271 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
273 case ci::RequestType::Recovery:
274 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
275 AddStep<ci::recovery::StepOpenRecoveryFile>();
276 AddStep<ci::configuration::StepParseManifest>(
277 ci::configuration::StepParseManifest::ManifestLocation::RECOVERY,
278 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
279 AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
280 AddStep<ci::filesystem::StepRecoverIcons>();
281 AddStep<ci::filesystem::StepRecoverManifest>();
282 AddStep<ci::filesystem::StepRecoverExternalStorage>();
283 AddStep<ci::filesystem::StepRecoverStorageDirectories>();
284 AddStep<ci::filesystem::StepRecoverFiles>();
285 AddStep<ci::mount::StepMountRecover>();
286 AddStep<tpk::security::StepTpkRecoverSignature>();
287 AddStep<ci::pkgmgr::StepRecoverApplication>();
288 AddStep<ci::filesystem::StepRecoverChangeOwner>();
289 AddStep<ci::security::StepRecoverSecurity>();
291 case ci::RequestType::Clear:
292 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
293 AddStep<ci::configuration::StepParseManifest>(
294 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
295 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
296 AddStep<ci::filesystem::StepClearData>();
298 case ci::RequestType::MountInstall:
299 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
300 AddStep<ci::mount::StepMountUnpacked>();
301 AddStep<ci::configuration::StepParseManifest>(
302 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
303 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
304 AddStep<ci::pkgmgr::StepCheckInstallable>();
305 AddStep<hybrid::configuration::StepStashTpkConfig>();
306 AddStep<wgt::configuration::StepParse>(
307 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
308 AddStep<hybrid::configuration::StepMergeTpkConfig>();
309 AddStep<ci::configuration::StepParsePreload>();
310 AddStep<ci::pkgmgr::StepCheckRestriction>();
311 AddStep<ci::configuration::StepCheckTizenVersion>();
312 AddStep<ci::security::StepCheckSignature>();
313 AddStep<ci::security::StepPrivilegeCompatibility>(
314 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
315 AddStep<wgt::security::StepCheckSettingsLevel>();
316 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
317 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
318 AddStep<wgt::security::StepCheckWgtImePrivilege>();
319 AddStep<hybrid::encryption::StepEncryptResources>();
320 AddStep<ci::security::StepRollbackInstallationSecurity>();
321 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
322 AddStep<ci::mount::StepMountInstall>();
323 AddStep<tpk::filesystem::StepTpkPreparePackageDirectory>();
324 AddStep<ci::filesystem::StepCopyTep>();
325 AddStep<tpk::filesystem::StepTpkPatchIcons>();
326 AddStep<wgt::filesystem::StepWgtPatchIcons>();
327 AddStep<ci::filesystem::StepCreateIcons>();
328 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
329 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
330 AddStep<ci::filesystem::StepCreateStorageDirectories>();
331 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
332 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
333 AddStep<wgt::pkgmgr::StepGenerateXml>();
334 AddStep<ci::security::StepRegisterSecurity>();
335 AddStep<ci::pkgmgr::StepRegisterApplication>();
336 AddStep<ci::pkgmgr::StepRunParserPlugin>(
337 ci::Plugin::ActionType::Install);
338 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
339 AddStep<ci::filesystem::StepChangeOwner>();
340 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
342 case ci::RequestType::MountUpdate:
343 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
344 AddStep<ci::mount::StepMountUnpacked>();
345 AddStep<ci::configuration::StepParseManifest>(
346 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
347 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
348 AddStep<hybrid::configuration::StepStashTpkConfig>();
349 AddStep<wgt::configuration::StepParse>(
350 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
351 AddStep<hybrid::configuration::StepMergeTpkConfig>();
352 AddStep<ci::configuration::StepParsePreload>();
353 AddStep<ci::configuration::StepCheckTizenVersion>();
354 AddStep<ci::security::StepCheckSignature>();
355 AddStep<ci::security::StepPrivilegeCompatibility>(
356 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
357 AddStep<wgt::security::StepCheckSettingsLevel>();
358 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
359 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
360 AddStep<wgt::security::StepCheckWgtImePrivilege>();
361 AddStep<hybrid::encryption::StepEncryptResources>();
362 AddStep<ci::configuration::StepParseManifest>(
363 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
364 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
365 AddStep<ci::configuration::StepBlockCrossUpdate>();
366 AddStep<ci::pkgmgr::StepKillApps>();
367 AddStep<ci::backup::StepBackupManifest>();
368 AddStep<ci::backup::StepBackupIcons>();
369 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
370 AddStep<ci::mount::StepMountUpdate>();
371 AddStep<tpk::filesystem::StepTpkUpdatePackageDirectory>();
372 AddStep<ci::filesystem::StepUpdateTep>();
373 AddStep<tpk::filesystem::StepTpkPatchIcons>();
374 AddStep<wgt::filesystem::StepWgtPatchIcons>();
375 AddStep<ci::filesystem::StepCreateIcons>();
376 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
377 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
378 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
379 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
380 AddStep<ci::security::StepUpdateSecurity>();
381 AddStep<wgt::pkgmgr::StepGenerateXml>();
382 AddStep<ci::pkgmgr::StepUpdateApplication>();
383 AddStep<ci::pkgmgr::StepRunParserPlugin>(
384 ci::Plugin::ActionType::Upgrade);
385 AddStep<ci::filesystem::StepChangeOwner>();
386 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
388 case ci::RequestType::ManifestDirectInstall:
389 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
390 AddStep<ci::configuration::StepParseManifest>(
391 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
392 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
393 AddStep<ci::pkgmgr::StepCheckInstallable>();
394 AddStep<hybrid::configuration::StepStashTpkConfig>();
395 AddStep<wgt::configuration::StepParse>(
396 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
397 AddStep<hybrid::configuration::StepMergeTpkConfig>();
398 AddStep<ci::configuration::StepParsePreload>();
399 AddStep<ci::configuration::StepCheckTizenVersion>();
400 AddStep<ci::security::StepCheckSignature>();
401 AddStep<ci::security::StepPrivilegeCompatibility>(
402 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
403 AddStep<wgt::security::StepCheckSettingsLevel>();
404 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
405 AddStep<ci::security::StepRollbackInstallationSecurity>();
406 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
407 AddStep<wgt::pkgmgr::StepGenerateXml>();
408 AddStep<ci::security::StepRegisterSecurity>();
409 AddStep<ci::pkgmgr::StepRegisterApplication>();
410 AddStep<ci::pkgmgr::StepRunParserPlugin>(
411 ci::Plugin::ActionType::Install);
412 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
413 AddStep<ci::filesystem::StepChangeOwner>();
414 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
416 case ci::RequestType::ManifestDirectUpdate:
417 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
418 AddStep<ci::filesystem::StepUnzip>();
419 AddStep<ci::configuration::StepParseManifest>(
420 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
421 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
422 AddStep<hybrid::configuration::StepStashTpkConfig>();
423 AddStep<wgt::configuration::StepParse>(
424 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
425 AddStep<hybrid::configuration::StepMergeTpkConfig>();
426 AddStep<ci::configuration::StepParsePreload>();
427 AddStep<ci::configuration::StepCheckTizenVersion>();
428 AddStep<ci::security::StepCheckSignature>();
429 AddStep<ci::security::StepPrivilegeCompatibility>(
430 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
431 AddStep<wgt::security::StepCheckSettingsLevel>();
432 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
433 AddStep<ci::security::StepRollbackInstallationSecurity>();
434 AddStep<ci::configuration::StepParseManifest>(
435 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
436 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
437 AddStep<ci::pkgmgr::StepKillApps>();
438 AddStep<ci::security::StepUpdateSecurity>();
439 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
440 AddStep<wgt::pkgmgr::StepGenerateXml>();
441 AddStep<ci::pkgmgr::StepUpdateApplication>();
442 AddStep<ci::pkgmgr::StepRunParserPlugin>(
443 ci::Plugin::ActionType::Upgrade);
444 AddStep<ci::filesystem::StepChangeOwner>();
445 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
447 case ci::RequestType::EnablePkg:
448 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
449 AddStep<ci::configuration::StepParseManifest>(
450 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
451 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
452 AddStep<ci::pkgmgr::StepKillApps>();
453 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
454 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable);
455 AddStep<ci::pkgmgr::StepRunParserPlugin>(
456 ci::Plugin::ActionType::Uninstall);
458 case ci::RequestType::DisablePkg:
459 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
460 AddStep<ci::configuration::StepParseManifest>(
461 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
462 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
463 AddStep<ci::pkgmgr::StepKillApps>();
464 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
465 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
466 AddStep<ci::pkgmgr::StepRunParserPlugin>(
467 ci::Plugin::ActionType::Uninstall);
470 AddStep<ci::configuration::StepFail>();
475 } // namespace hybrid