#include <common/step/security/step_register_trust_anchor.h>
#include <common/step/security/step_unregister_trust_anchor.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_tpk_patch_icons.h>
#include <tpk/step/filesystem/step_tpk_prepare_package_directory.h>
#include <tpk/step/filesystem/step_tpk_update_package_directory.h>
#include "wgt/step/configuration/step_set_old_signature_files_location.h"
#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h"
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
#include <pkgmgr-info.h>
#include <unistd.h>
namespace wgt {
namespace filesystem {
-bool StepCreateSymbolicLink::CreateSymlinksForApps() {
+bool StepCreateWgtSymbolicLink::CreateSymlinksForApps() {
boost::system::error_code error;
for (application_x* app :
- GListRange<application_x*>(context_->manifest_data.get()->application)) {
+ GListRange<application_x*>(context_->manifest_data.get()->application)) {
// filter out non-wgt apps as this step is run for hybrid backend too
if (strcmp("webapp", app->type) != 0)
continue;
return true;
}
-common_installer::Step::Status StepCreateSymbolicLink::process() {
+common_installer::Step::Status StepCreateWgtSymbolicLink::precheck() {
+ if (!context_->manifest_data.get()) {
+ LOG(ERROR) << "Manifest data empty";
+ return Status::ERROR;
+ }
+
+ return Status::OK;
+}
+
+common_installer::Step::Status StepCreateWgtSymbolicLink::process() {
assert(context_->manifest_data.get());
if (!CreateSymlinksForApps())
return Status::OK;
}
-common_installer::Step::Status StepCreateSymbolicLink::undo() {
+common_installer::Step::Status StepCreateWgtSymbolicLink::undo() {
for (application_x* app :
- GListRange<application_x*>(context_->manifest_data.get()->application)) {
+ GListRange<application_x*>(context_->manifest_data.get()->application)) {
bf::path exec_path = context_->GetPkgPath() / "bin" / app->appid;
common_installer::RemoveAll(exec_path);
}
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
-#define WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
+#ifndef WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
+#define WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
#include <boost/filesystem.hpp>
/**
* \brief Step that create symbolic link to application
*/
-class StepCreateSymbolicLink : public common_installer::Step {
+class StepCreateWgtSymbolicLink : public common_installer::Step {
public:
using Step::Step;
Status undo() override;
/**
- * \brief Empty method
+ * \brief Check weather manifest data is empty or not
*
* \return Status::OK
*/
- Status precheck() override { return Status::OK; }
+ Status precheck() override;
private:
bool CreateSymlinksForApps();
} // namespace filesystem
} // namespace wgt
-#endif // WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
+#endif // WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
#include "wgt/step/encryption/step_encrypt_resources.h"
#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_prepare_package_directory.h"
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::filesystem::StepWgtPreparePackageDirectory>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::filesystem::StepWgtUpdatePackageDirectory>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
AddStep<ci::filesystem::StepCreateStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::security::StepCheckExtensionPrivileges>();