+++ /dev/null
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by a apache 2.0 license that can be
-// found in the LICENSE file.
-
-#include "tpk/step/configuration/step_parse_preload.h"
-
-#include <pkgmgr-info.h>
-#include <unistd.h>
-
-#include <boost/filesystem.hpp>
-
-#include <cstring>
-#include <cstdio>
-#include <string>
-
-#include "common/pkgmgr_interface.h"
-#include "common/utils/file_util.h"
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-namespace tpk {
-namespace configuration {
-
-ci::Step::Status StepParsePreload::process() {
- const char* preload_manifest_val = context_->manifest_data.get()->preload;
-
- if (strcmp(preload_manifest_val, "true") != 0) {
- bool is_preload = context_->is_preload_request.get();
-
- LOG(INFO) << "is_preload : (" << is_preload << ")";
- if (is_preload) {
- context_->manifest_data.get()->preload = strdup("true");
-
- if (getuid() != 0) {
- LOG(ERROR) << "You're not authorized to install preload app: "
- << context_->pkgid.get().c_str();
- return Status::OPERATION_NOT_ALLOWED;
- }
- } else {
- context_->manifest_data.get()->preload = strdup("false");
- }
- }
-
- return Status::OK;
-}
-
-} // namespace configuration
-} // namespace tpk
+++ /dev/null
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by a apache 2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef TPK_STEP_CONFIGURATION_STEP_PARSE_PRELOAD_H_
-#define TPK_STEP_CONFIGURATION_STEP_PARSE_PRELOAD_H_
-
-#include <manifest_parser/utils/logging.h>
-
-#include "common/installer_context.h"
-#include "common/step/step.h"
-
-namespace tpk {
-namespace configuration {
-
-class StepParsePreload : 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(ParsePreload)
-};
-
-} // namespace configuration
-} // namespace tpk
-
-#endif // TPK_STEP_CONFIGURATION_STEP_PARSE_PRELOAD_H_
#include <common/step/configuration/step_configure.h>
#include <common/step/configuration/step_fail.h>
#include <common/step/configuration/step_parse_manifest.h>
+#include <common/step/configuration/step_parse_preload.h>
#include <common/step/filesystem/step_acquire_external_storage.h>
#include <common/step/filesystem/step_clear_data.h>
#include <common/step/filesystem/step_copy.h>
#include <common/step/security/step_rollback_installation_security.h>
#include <common/step/security/step_update_security.h>
-#include "tpk/step/configuration/step_parse_preload.h"
#include "tpk/step/filesystem/step_create_external_storage_directories.h"
#include "tpk/step/filesystem/step_create_symbolic_link.h"
#include "tpk/step/filesystem/step_check_pkg_directory_path.h"
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<ci::security::StepPrivilegeCompatibility>();
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
// TODO(t.iwanek): add StepCheckSignature which is missing
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<ci::security::StepPrivilegeCompatibility>();
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
AddStep<tpk::filesystem::StepCheckPkgDirPath>();
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<tpk::pkgmgr::StepManifestAdjustment>();
AddStep<ci::security::StepCheckSignature>();
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
- AddStep<tpk::configuration::StepParsePreload>();
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<tpk::pkgmgr::StepManifestAdjustment>();
AddStep<ci::security::StepCheckSignature>();