Same step name exists on wgt-backend.
Change-Id: Iea12e8def08dd21e91302a602c82c1eb91881c97
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
+++ /dev/null
-/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
-
-#include "tpk/step/filesystem/step_create_symbolic_link.h"
-
-#include <boost/filesystem.hpp>
-#include <boost/system/error_code.hpp>
-
-#include <common/app_installer.h>
-#include <common/step/step.h>
-#include <common/installer_context.h>
-#include <common/utils/file_util.h>
-#include <common/utils/glist_range.h>
-
-#include <pkgmgr-info.h>
-
-#include <iostream>
-
-namespace tpk {
-namespace filesystem {
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-using common_installer::InstallerContext;
-typedef common_installer::Step::Status Status;
-
-bool CreateSymLink(application_x* app, InstallerContext* context) {
- boost::system::error_code boost_error;
- bf::path bindir = context->GetPkgPath() /
- bf::path("bin");
- LOG(DEBUG) << "Creating dir: " << bindir;
- if (!bf::is_symlink(symlink_status(bindir)) &&
- !common_installer::CreateDir(bindir)) {
- LOG(ERROR) << "Directory creation failure: " << bindir;
- return false;
- }
-
- if (app->ui_gadget && strcmp(app->ui_gadget, "true") == 0) {
- // Ug-client path
- // Make a symlink with the name of appid, pointing /usr/bin/ug-client
- bf::path app_exec_path(app->exec);
- if (!bf::exists(app_exec_path)) {
- bf::path ug_client_path(tzplatform_mkpath(TZ_SYS_BIN, "ug-client"));
- LOG(INFO) << "Createing symlink " << app_exec_path << " pointing " <<
- ug_client_path;
- bf::create_symlink(ug_client_path, app_exec_path, boost_error);
- if (boost_error) {
- LOG(ERROR) << "Symlink creation failure: " << app_exec_path;
- return false;
- }
- }
- }
-
- return true;
-}
-
-Status StepCreateSymbolicLink::precheck() {
- manifest_x *m = context_->manifest_data.get();
- if (!m) {
- LOG(ERROR) << "manifest_data attribute is empty";
- return Step::Status::INVALID_VALUE;
- }
- if (!m->application) {
- LOG(ERROR) << "No application exists";
- return Step::Status::ERROR;
- }
-
- return Step::Status::OK;
-}
-
-Status StepCreateSymbolicLink::process() {
- manifest_x* m = context_->manifest_data.get();
- for (application_x* app : GListRange<application_x*>(m->application)) {
- // filter out non-tpk apps as this step is run for hybrid backend too
- if (strcmp("webapp", app->type) == 0)
- continue;
- if (!CreateSymLink(app, context_))
- return Status::ERROR;
- }
- return Status::OK;
-}
-
-} // namespace filesystem
-} // namespace tpk
+++ /dev/null
-/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
-
-#ifndef TPK_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
-#define TPK_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
-
-#include <manifest_parser/utils/logging.h>
-
-#include <common/app_installer.h>
-
-namespace tpk {
-namespace filesystem {
-
-class StepCreateSymbolicLink : 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;
-
- STEP_NAME(CreateSymbolicLink)
-};
-
-} // namespace filesystem
-} // namespace tpk
-
-#endif // TPK_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
--- /dev/null
+/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
+
+#include "tpk/step/filesystem/step_create_tpk_symbolic_link.h"
+
+#include <boost/filesystem.hpp>
+#include <boost/system/error_code.hpp>
+
+#include <common/app_installer.h>
+#include <common/step/step.h>
+#include <common/installer_context.h>
+#include <common/utils/file_util.h>
+#include <common/utils/glist_range.h>
+
+#include <pkgmgr-info.h>
+
+#include <iostream>
+
+namespace tpk {
+namespace filesystem {
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+using common_installer::InstallerContext;
+typedef common_installer::Step::Status Status;
+
+bool CreateSymLink(application_x* app, InstallerContext* context) {
+ boost::system::error_code boost_error;
+ bf::path bindir = context->GetPkgPath() /
+ bf::path("bin");
+ LOG(DEBUG) << "Creating dir: " << bindir;
+ if (!bf::is_symlink(symlink_status(bindir)) &&
+ !common_installer::CreateDir(bindir)) {
+ LOG(ERROR) << "Directory creation failure: " << bindir;
+ return false;
+ }
+
+ if (app->ui_gadget && strcmp(app->ui_gadget, "true") == 0) {
+ // Ug-client path
+ // Make a symlink with the name of appid, pointing /usr/bin/ug-client
+ bf::path app_exec_path(app->exec);
+ if (!bf::exists(app_exec_path)) {
+ bf::path ug_client_path(tzplatform_mkpath(TZ_SYS_BIN, "ug-client"));
+ LOG(INFO) << "Createing symlink " << app_exec_path << " pointing " <<
+ ug_client_path;
+ bf::create_symlink(ug_client_path, app_exec_path, boost_error);
+ if (boost_error) {
+ LOG(ERROR) << "Symlink creation failure: " << app_exec_path;
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+Status StepCreateTpkSymbolicLink::precheck() {
+ manifest_x *m = context_->manifest_data.get();
+ if (!m) {
+ LOG(ERROR) << "manifest_data attribute is empty";
+ return Step::Status::INVALID_VALUE;
+ }
+ if (!m->application) {
+ LOG(ERROR) << "No application exists";
+ return Step::Status::ERROR;
+ }
+
+ return Step::Status::OK;
+}
+
+Status StepCreateTpkSymbolicLink::process() {
+ manifest_x* m = context_->manifest_data.get();
+ for (application_x* app : GListRange<application_x*>(m->application)) {
+ // filter out non-tpk apps as this step is run for hybrid backend too
+ if (strcmp("webapp", app->type) == 0)
+ continue;
+ if (!CreateSymLink(app, context_))
+ return Status::ERROR;
+ }
+ return Status::OK;
+}
+
+} // namespace filesystem
+} // namespace tpk
--- /dev/null
+/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
+
+#ifndef TPK_STEP_FILESYSTEM_STEP_CREATE_TPK_SYMBOLIC_LINK_H_
+#define TPK_STEP_FILESYSTEM_STEP_CREATE_TPK_SYMBOLIC_LINK_H_
+
+#include <manifest_parser/utils/logging.h>
+
+#include <common/app_installer.h>
+
+namespace tpk {
+namespace filesystem {
+
+class StepCreateTpkSymbolicLink : 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;
+
+ STEP_NAME(CreateTpkSymbolicLink)
+};
+
+} // namespace filesystem
+} // namespace tpk
+
+#endif // TPK_STEP_FILESYSTEM_STEP_CREATE_TPK_SYMBOLIC_LINK_H_
#include "tpk/step/configuration/step_adjust_install_location.h"
#include "tpk/step/configuration/step_check_reinstall_manifest.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_create_tpk_symbolic_link.h"
#include "tpk/step/filesystem/step_check_pkg_directory_path.h"
#include "tpk/step/filesystem/step_remove_external_storage_directories.h"
#include "tpk/step/filesystem/step_tpk_patch_icons.h"
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<tpk::filesystem::StepCreateExternalStorageDirectories>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<tpk::pkgmgr::StepConvertXml>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::filesystem::StepCopyStorageDirectories>();
AddStep<tpk::filesystem::StepUpdateExternalStorageDirectories>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<tpk::pkgmgr::StepConvertXml>();
AddStep<ci::rds::StepRDSParse>();
AddStep<ci::rds::StepRDSModify>();
AddStep<ci::filesystem::StepUpdateTep>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<tpk::filesystem::StepUpdateExternalStorageDirectories>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::filesystem::StepCopyStorageDirectories>();
AddStep<tpk::filesystem::StepUpdateExternalStorageDirectories>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<tpk::pkgmgr::StepConvertXml>();
AddStep<tpk::filesystem::StepTpkPreparePackageDirectory>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<tpk::filesystem::StepCreateExternalStorageDirectories>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<tpk::pkgmgr::StepConvertXml>();
AddStep<ci::mount::StepMountUpdate>();
AddStep<tpk::filesystem::StepTpkPreparePackageDirectory>();
AddStep<ci::filesystem::StepUpdateTep>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<tpk::filesystem::StepUpdateExternalStorageDirectories>();
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::filesystem::StepCreateStorageDirectories>();
AddStep<tpk::filesystem::StepCreateExternalStorageDirectories>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<tpk::pkgmgr::StepConvertXml>();
AddStep<tpk::pkgmgr::StepManifestAdjustment>();