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"
6 #include "hybrid/shared_dirs.h"
8 #include <common/privileges.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_ownership_and_permission.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_force_clean.h>
51 #include <common/step/pkgmgr/step_check_installable.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/recovery/step_open_recovery_file.h>
63 #include <common/step/security/step_check_signature.h>
64 #include <common/step/security/step_privilege_compatibility.h>
65 #include <common/step/security/step_recover_security.h>
66 #include <common/step/security/step_register_security.h>
67 #include <common/step/security/step_revoke_security.h>
68 #include <common/step/security/step_rollback_deinstallation_security.h>
69 #include <common/step/security/step_rollback_installation_security.h>
70 #include <common/step/security/step_update_security.h>
72 #include <tpk/step/filesystem/step_create_symbolic_link.h>
73 #include <tpk/step/filesystem/step_tpk_patch_icons.h>
74 #include <tpk/step/filesystem/step_tpk_prepare_package_directory.h>
75 #include <tpk/step/filesystem/step_tpk_update_package_directory.h>
76 #include <tpk/step/security/step_tpk_recover_signature.h>
78 #include "hybrid/hybrid_backend_data.h"
79 #include "hybrid/step/configuration/step_merge_tpk_config.h"
80 #include "hybrid/step/configuration/step_stash_tpk_config.h"
81 #include "hybrid/step/encryption/step_encrypt_resources.h"
82 #include "hybrid/step/pkgmgr/step_generate_xml.h"
83 #include "wgt/step/configuration/step_parse.h"
84 #include "wgt/step/encryption/step_remove_encryption_data.h"
85 #include "wgt/step/filesystem/step_copy_preview_icons.h"
86 #include "wgt/step/filesystem/step_create_symbolic_link.h"
87 #include "wgt/step/filesystem/step_wgt_patch_icons.h"
88 #include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
89 #include "wgt/step/pkgmgr/step_generate_xml.h"
90 #include "wgt/step/security/step_check_settings_level.h"
91 #include "wgt/step/security/step_check_wgt_background_category.h"
92 #include "wgt/step/security/step_check_wgt_notification_category.h"
93 #include "wgt/step/security/step_check_wgt_ime_privilege.h"
95 namespace ci = common_installer;
99 HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
100 : AppInstaller("wgt", pkgmgr) {
101 context_->cross_app_rules.set(true);
102 context_->backend_data.set(new HybridBackendData());
104 switch (pkgmgr_->GetRequestType()) {
105 case ci::RequestType::Install:
106 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
107 AddStep<ci::filesystem::StepUnzip>();
108 AddStep<ci::configuration::StepParseManifest>(
109 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
110 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
111 AddStep<ci::pkgmgr::StepCheckInstallable>();
112 AddStep<hybrid::configuration::StepStashTpkConfig>();
113 AddStep<wgt::configuration::StepParse>(
114 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
115 AddStep<ci::configuration::StepParsePreload>();
116 AddStep<ci::pkgmgr::StepCheckRestriction>();
117 AddStep<ci::configuration::StepCheckTizenVersion>();
118 AddStep<ci::security::StepCheckSignature>();
119 AddStep<ci::security::StepPrivilegeCompatibility>(
120 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
121 AddStep<wgt::security::StepCheckSettingsLevel>();
122 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
123 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
124 AddStep<wgt::security::StepCheckWgtImePrivilege>();
125 AddStep<hybrid::encryption::StepEncryptResources>();
126 AddStep<ci::security::StepRollbackInstallationSecurity>();
127 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
128 AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
129 AddStep<ci::filesystem::StepCopy>();
130 AddStep<ci::filesystem::StepCopyTep>();
131 AddStep<tpk::filesystem::StepTpkPatchIcons>();
132 AddStep<wgt::filesystem::StepWgtPatchIcons>();
133 AddStep<ci::filesystem::StepCreateIcons>();
134 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
135 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
136 AddStep<ci::filesystem::StepCreateStorageDirectories>();
137 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
138 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
139 AddStep<wgt::pkgmgr::StepGenerateXml>();
140 AddStep<hybrid::pkgmgr::StepGenerateXml>();
141 AddStep<hybrid::configuration::StepMergeTpkConfig>();
142 AddStep<ci::security::StepRegisterSecurity>();
143 AddStep<ci::pkgmgr::StepRegisterApplication>();
144 AddStep<ci::pkgmgr::StepRunParserPlugin>(
145 ci::Plugin::ActionType::Install);
146 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>(
147 wgt::filesystem::HybridAdditionalSharedDirs);
148 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
149 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
151 case ci::RequestType::Update:
152 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
153 AddStep<ci::filesystem::StepUnzip>();
154 AddStep<ci::configuration::StepParseManifest>(
155 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
156 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
157 AddStep<hybrid::configuration::StepStashTpkConfig>();
158 AddStep<wgt::configuration::StepParse>(
159 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
160 AddStep<ci::configuration::StepParsePreload>();
161 AddStep<ci::configuration::StepCheckTizenVersion>();
162 AddStep<ci::security::StepCheckSignature>();
163 AddStep<ci::security::StepPrivilegeCompatibility>(
164 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
165 AddStep<wgt::security::StepCheckSettingsLevel>();
166 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
167 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
168 AddStep<wgt::security::StepCheckWgtImePrivilege>();
169 AddStep<hybrid::encryption::StepEncryptResources>();
170 AddStep<ci::configuration::StepParseManifest>(
171 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
172 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
173 AddStep<ci::configuration::StepBlockCrossUpdate>();
174 AddStep<ci::pkgmgr::StepKillApps>();
175 AddStep<ci::backup::StepBackupManifest>();
176 AddStep<ci::backup::StepBackupIcons>();
177 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
178 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
179 AddStep<ci::backup::StepCopyBackup>();
180 AddStep<ci::filesystem::StepUpdateTep>();
181 AddStep<tpk::filesystem::StepTpkPatchIcons>();
182 AddStep<wgt::filesystem::StepWgtPatchIcons>();
183 AddStep<ci::filesystem::StepCreateIcons>();
184 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
185 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
186 AddStep<ci::filesystem::StepCopyStorageDirectories>();
187 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
188 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
189 AddStep<ci::security::StepUpdateSecurity>();
190 AddStep<wgt::pkgmgr::StepGenerateXml>();
191 AddStep<hybrid::pkgmgr::StepGenerateXml>();
192 AddStep<hybrid::configuration::StepMergeTpkConfig>();
193 AddStep<ci::pkgmgr::StepUpdateApplication>();
194 AddStep<ci::pkgmgr::StepRunParserPlugin>(
195 ci::Plugin::ActionType::Upgrade);
196 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
197 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
199 case ci::RequestType::Uninstall:
200 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
201 AddStep<ci::pkgmgr::StepCheckRestriction>();
202 AddStep<ci::pkgmgr::StepCheckRemovable>();
203 AddStep<ci::pkgmgr::StepCheckForceClean>();
204 AddStep<ci::configuration::StepParseManifest>(
205 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
206 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
207 AddStep<ci::pkgmgr::StepRunParserPlugin>(
208 ci::Plugin::ActionType::Uninstall);
209 AddStep<ci::pkgmgr::StepKillApps>();
210 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
211 AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
212 AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
213 AddStep<ci::pkgmgr::StepUnregisterApplication>();
214 AddStep<ci::security::StepRollbackDeinstallationSecurity>();
215 AddStep<ci::filesystem::StepRemoveTep>();
216 AddStep<ci::filesystem::StepRemoveFiles>();
217 AddStep<ci::filesystem::StepRemoveZipImage>();
218 AddStep<ci::filesystem::StepRemoveIcons>();
219 AddStep<wgt::encryption::StepRemoveEncryptionData>();
220 AddStep<ci::security::StepRevokeSecurity>();
221 AddStep<ci::pkgmgr::StepRemoveManifest>();
222 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
224 case ci::RequestType::Reinstall:
225 // RDS is not supported for hybrid apps
226 AddStep<ci::configuration::StepFail>();
228 case ci::RequestType::Delta:
229 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
230 AddStep<ci::filesystem::StepUnzip>();
231 AddStep<ci::configuration::StepParseManifest>(
232 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
233 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
234 AddStep<hybrid::configuration::StepStashTpkConfig>();
235 AddStep<ci::configuration::StepParseManifest>(
236 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
237 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
238 AddStep<ci::filesystem::StepEnableExternalMount>();
239 AddStep<ci::filesystem::StepDeltaPatch>();
240 AddStep<ci::filesystem::StepDisableExternalMount>();
241 AddStep<wgt::configuration::StepParse>(
242 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
243 AddStep<ci::configuration::StepParsePreload>();
244 AddStep<ci::configuration::StepCheckTizenVersion>();
245 AddStep<ci::security::StepCheckSignature>();
246 AddStep<ci::security::StepPrivilegeCompatibility>(
247 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
248 AddStep<wgt::security::StepCheckSettingsLevel>();
249 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
250 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
251 AddStep<wgt::security::StepCheckWgtImePrivilege>();
252 AddStep<hybrid::encryption::StepEncryptResources>();
253 AddStep<ci::security::StepRollbackInstallationSecurity>();
254 AddStep<ci::configuration::StepBlockCrossUpdate>();
255 AddStep<ci::pkgmgr::StepKillApps>();
256 AddStep<ci::backup::StepBackupManifest>();
257 AddStep<ci::backup::StepBackupIcons>();
258 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
259 AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
260 AddStep<ci::backup::StepCopyBackup>();
261 AddStep<ci::filesystem::StepUpdateTep>();
262 AddStep<tpk::filesystem::StepTpkPatchIcons>();
263 AddStep<wgt::filesystem::StepWgtPatchIcons>();
264 AddStep<ci::filesystem::StepCreateIcons>();
265 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
266 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
267 AddStep<ci::filesystem::StepCopyStorageDirectories>();
268 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
269 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
270 AddStep<ci::security::StepUpdateSecurity>();
271 AddStep<wgt::pkgmgr::StepGenerateXml>();
272 AddStep<hybrid::pkgmgr::StepGenerateXml>();
273 AddStep<hybrid::configuration::StepMergeTpkConfig>();
274 AddStep<ci::pkgmgr::StepUpdateApplication>();
275 AddStep<ci::pkgmgr::StepRunParserPlugin>(
276 ci::Plugin::ActionType::Upgrade);
277 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
278 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
280 case ci::RequestType::Recovery:
281 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
282 AddStep<ci::recovery::StepOpenRecoveryFile>();
283 AddStep<ci::configuration::StepParseManifest>(
284 ci::configuration::StepParseManifest::ManifestLocation::RECOVERY,
285 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
286 AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
287 AddStep<ci::filesystem::StepRecoverIcons>();
288 AddStep<ci::filesystem::StepRecoverManifest>();
289 AddStep<ci::filesystem::StepRecoverExternalStorage>();
290 AddStep<ci::filesystem::StepRecoverStorageDirectories>();
291 AddStep<ci::filesystem::StepRecoverFiles>();
292 AddStep<ci::mount::StepMountRecover>();
293 AddStep<tpk::security::StepTpkRecoverSignature>();
294 AddStep<ci::pkgmgr::StepRecoverApplication>();
295 AddStep<ci::filesystem::StepRecoverChangeOwner>();
296 AddStep<ci::security::StepRecoverSecurity>();
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<ci::configuration::StepParsePreload>();
309 AddStep<ci::pkgmgr::StepCheckRestriction>();
310 AddStep<ci::configuration::StepCheckTizenVersion>();
311 AddStep<ci::security::StepCheckSignature>();
312 AddStep<ci::security::StepPrivilegeCompatibility>(
313 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
314 AddStep<wgt::security::StepCheckSettingsLevel>();
315 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
316 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
317 AddStep<wgt::security::StepCheckWgtImePrivilege>();
318 AddStep<hybrid::encryption::StepEncryptResources>();
319 AddStep<ci::security::StepRollbackInstallationSecurity>();
320 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
321 AddStep<ci::mount::StepMountInstall>();
322 AddStep<tpk::filesystem::StepTpkPreparePackageDirectory>();
323 AddStep<ci::filesystem::StepCopyTep>();
324 AddStep<tpk::filesystem::StepTpkPatchIcons>();
325 AddStep<wgt::filesystem::StepWgtPatchIcons>();
326 AddStep<ci::filesystem::StepCreateIcons>();
327 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
328 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
329 AddStep<ci::filesystem::StepCreateStorageDirectories>();
330 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
331 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
332 AddStep<wgt::pkgmgr::StepGenerateXml>();
333 AddStep<hybrid::pkgmgr::StepGenerateXml>();
334 AddStep<hybrid::configuration::StepMergeTpkConfig>();
335 AddStep<ci::security::StepRegisterSecurity>();
336 AddStep<ci::pkgmgr::StepRegisterApplication>();
337 AddStep<ci::pkgmgr::StepRunParserPlugin>(
338 ci::Plugin::ActionType::Install);
339 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>(
340 wgt::filesystem::HybridAdditionalSharedDirs);
341 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
342 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
344 case ci::RequestType::MountUpdate:
345 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
346 AddStep<ci::mount::StepMountUnpacked>();
347 AddStep<ci::configuration::StepParseManifest>(
348 ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
349 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
350 AddStep<hybrid::configuration::StepStashTpkConfig>();
351 AddStep<wgt::configuration::StepParse>(
352 wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true);
353 AddStep<ci::configuration::StepParsePreload>();
354 AddStep<ci::configuration::StepCheckTizenVersion>();
355 AddStep<ci::security::StepCheckSignature>();
356 AddStep<ci::security::StepPrivilegeCompatibility>(
357 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
358 AddStep<wgt::security::StepCheckSettingsLevel>();
359 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
360 AddStep<wgt::security::StepCheckWgtNotificationCategory>();
361 AddStep<wgt::security::StepCheckWgtImePrivilege>();
362 AddStep<hybrid::encryption::StepEncryptResources>();
363 AddStep<ci::configuration::StepParseManifest>(
364 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
365 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
366 AddStep<ci::configuration::StepBlockCrossUpdate>();
367 AddStep<ci::pkgmgr::StepKillApps>();
368 AddStep<ci::backup::StepBackupManifest>();
369 AddStep<ci::backup::StepBackupIcons>();
370 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
371 AddStep<ci::mount::StepMountUpdate>();
372 AddStep<tpk::filesystem::StepTpkUpdatePackageDirectory>();
373 AddStep<ci::filesystem::StepUpdateTep>();
374 AddStep<tpk::filesystem::StepTpkPatchIcons>();
375 AddStep<wgt::filesystem::StepWgtPatchIcons>();
376 AddStep<ci::filesystem::StepCreateIcons>();
377 AddStep<wgt::filesystem::StepCopyPreviewIcons>();
378 AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
379 AddStep<wgt::filesystem::StepCreateSymbolicLink>();
380 AddStep<tpk::filesystem::StepCreateSymbolicLink>();
381 AddStep<ci::security::StepUpdateSecurity>();
382 AddStep<wgt::pkgmgr::StepGenerateXml>();
383 AddStep<hybrid::pkgmgr::StepGenerateXml>();
384 AddStep<hybrid::configuration::StepMergeTpkConfig>();
385 AddStep<ci::pkgmgr::StepUpdateApplication>();
386 AddStep<ci::pkgmgr::StepRunParserPlugin>(
387 ci::Plugin::ActionType::Upgrade);
388 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
389 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
391 case ci::RequestType::ManifestDirectInstall:
392 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
393 AddStep<ci::configuration::StepParseManifest>(
394 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
395 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
396 AddStep<ci::pkgmgr::StepCheckInstallable>();
397 AddStep<hybrid::configuration::StepStashTpkConfig>();
398 AddStep<wgt::configuration::StepParse>(
399 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
400 AddStep<ci::configuration::StepParsePreload>();
401 AddStep<ci::configuration::StepCheckTizenVersion>();
402 AddStep<ci::security::StepCheckSignature>();
403 AddStep<ci::security::StepPrivilegeCompatibility>(
404 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
405 AddStep<wgt::security::StepCheckSettingsLevel>();
406 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
407 AddStep<ci::security::StepRollbackInstallationSecurity>();
408 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
409 AddStep<wgt::pkgmgr::StepGenerateXml>();
410 AddStep<hybrid::pkgmgr::StepGenerateXml>();
411 AddStep<hybrid::configuration::StepMergeTpkConfig>();
412 AddStep<ci::security::StepRegisterSecurity>();
413 AddStep<ci::pkgmgr::StepRegisterApplication>();
414 AddStep<ci::pkgmgr::StepRunParserPlugin>(
415 ci::Plugin::ActionType::Install);
416 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>(
417 wgt::filesystem::HybridAdditionalSharedDirs);
418 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
419 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
421 case ci::RequestType::ManifestDirectUpdate:
422 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
423 AddStep<ci::configuration::StepParseManifest>(
424 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
425 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
426 AddStep<hybrid::configuration::StepStashTpkConfig>();
427 AddStep<wgt::configuration::StepParse>(
428 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
429 AddStep<ci::configuration::StepParsePreload>();
430 AddStep<ci::configuration::StepCheckTizenVersion>();
431 AddStep<ci::security::StepCheckSignature>();
432 AddStep<ci::security::StepPrivilegeCompatibility>(
433 ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
434 AddStep<wgt::security::StepCheckSettingsLevel>();
435 AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
436 AddStep<ci::security::StepRollbackInstallationSecurity>();
437 AddStep<ci::configuration::StepParseManifest>(
438 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
439 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
440 AddStep<ci::pkgmgr::StepKillApps>();
441 AddStep<ci::security::StepUpdateSecurity>();
442 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
443 AddStep<wgt::pkgmgr::StepGenerateXml>();
444 AddStep<hybrid::pkgmgr::StepGenerateXml>();
445 AddStep<hybrid::configuration::StepMergeTpkConfig>();
446 AddStep<ci::pkgmgr::StepUpdateApplication>();
447 AddStep<ci::pkgmgr::StepRunParserPlugin>(
448 ci::Plugin::ActionType::Upgrade);
449 AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
450 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
452 case ci::RequestType::ManifestPartialInstall: {
453 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
454 AddStep<ci::configuration::StepParseManifest>(
455 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
456 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
457 AddStep<hybrid::configuration::StepStashTpkConfig>();
458 AddStep<wgt::configuration::StepParse>(
459 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
460 AddStep<hybrid::configuration::StepMergeTpkConfig>();
461 AddStep<ci::configuration::StepParsePreload>();
462 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
463 AddStep<ci::security::StepRegisterSecurity>();
464 AddStep<ci::pkgmgr::StepRegisterApplication>();
465 AddStep<ci::pkgmgr::StepRunParserPlugin>(
466 ci::Plugin::ActionType::Install);
467 AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>(
468 wgt::filesystem::HybridAdditionalSharedDirs);
469 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
472 case ci::RequestType::ManifestPartialUpdate: {
473 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
474 AddStep<ci::configuration::StepParseManifest>(
475 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
476 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
477 AddStep<hybrid::configuration::StepStashTpkConfig>();
478 AddStep<wgt::configuration::StepParse>(
479 wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
480 AddStep<hybrid::configuration::StepMergeTpkConfig>();
481 AddStep<ci::configuration::StepParsePreload>();
482 AddStep<ci::configuration::StepParseManifest>(
483 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
484 ci::configuration::StepParseManifest::StoreLocation::BACKUP);
485 AddStep<ci::security::StepUpdateSecurity>();
486 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
487 AddStep<ci::pkgmgr::StepUpdateApplication>();
488 AddStep<ci::pkgmgr::StepRunParserPlugin>(
489 ci::Plugin::ActionType::Upgrade);
490 AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
493 case ci::RequestType::PartialUninstall: {
494 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
495 AddStep<ci::pkgmgr::StepCheckRestriction>();
496 AddStep<ci::pkgmgr::StepCheckRemovable>();
497 AddStep<ci::pkgmgr::StepCheckForceClean>();
498 AddStep<ci::configuration::StepParseManifest>(
499 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
500 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
501 AddStep<ci::pkgmgr::StepRunParserPlugin>(
502 ci::Plugin::ActionType::Uninstall);
503 AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
504 AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
505 AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
506 AddStep<ci::pkgmgr::StepUnregisterApplication>();
507 AddStep<wgt::encryption::StepRemoveEncryptionData>();
508 AddStep<ci::security::StepRevokeSecurity>();
511 case ci::RequestType::EnablePkg:
512 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
513 AddStep<ci::configuration::StepParseManifest>(
514 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
515 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
516 AddStep<ci::pkgmgr::StepKillApps>();
517 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
518 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable);
519 AddStep<ci::pkgmgr::StepRunParserPlugin>(
520 ci::Plugin::ActionType::Uninstall);
522 case ci::RequestType::DisablePkg:
523 AddStep<ci::configuration::StepConfigure>(pkgmgr_);
524 AddStep<ci::configuration::StepParseManifest>(
525 ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
526 ci::configuration::StepParseManifest::StoreLocation::NORMAL);
527 AddStep<ci::pkgmgr::StepKillApps>();
528 AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
529 ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
530 AddStep<ci::pkgmgr::StepRunParserPlugin>(
531 ci::Plugin::ActionType::Uninstall);
534 AddStep<ci::configuration::StepFail>();
539 } // namespace hybrid