#include "hybrid/hybrid_backend_data.h"
#include "hybrid/step/configuration/step_merge_tpk_config.h"
+#include "hybrid/step/configuration/step_merge_tpk_privileges.h"
#include "hybrid/step/configuration/step_stash_tpk_config.h"
#include "hybrid/step/encryption/step_encrypt_resources.h"
#include "hybrid/step/pkgmgr/step_generate_xml.h"
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
+ AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
AddStep<wgt::security::StepCheckSettingsLevel>();
--- /dev/null
+// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "hybrid/step/configuration/step_merge_tpk_privileges.h"
+
+#include <pkgmgrinfo_basic.h>
+
+#include "hybrid/hybrid_backend_data.h"
+
+namespace hybrid {
+namespace configuration {
+
+common_installer::Step::Status StepMergeTpkPrivileges::process() {
+ HybridBackendData* data =
+ static_cast<HybridBackendData*>(context_->backend_data.get());
+ manifest_x* tpk_data = data->tpk_manifest_data.get();
+ manifest_x* wgt_data = context_->manifest_data.get();
+
+ wgt_data->privileges =
+ g_list_concat(wgt_data->privileges, tpk_data->privileges);
+ tpk_data->privileges = nullptr;
+
+ return Status::OK;
+}
+
+} // namespace configuration
+} // namespace hybrid
--- /dev/null
+// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_PRIVILEGES_H_
+#define HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_PRIVILEGES_H_
+
+#include <common/step/step.h>
+#include <manifest_parser/utils/logging.h>
+
+namespace hybrid {
+namespace configuration {
+
+class StepMergeTpkPrivileges : public common_installer::Step {
+ public:
+ using Step::Step;
+
+ Status process() override;
+ Status clean() override { return Status::OK; }
+ Status undo() override { return Status::OK; }
+ Status precheck() override { return Status::OK; }
+
+ STEP_NAME(MergeTpkPrivileges)
+};
+
+} // namespace configuration
+} // namespace hybrid
+
+#endif // HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_PRIVILEGES_H_