// data from config.xml
Property<ConfigData> config_data;
- // path for the applications directory
- Property<boost::filesystem::path> application_path;
-
// path for the applications root directory
Property<boost::filesystem::path> root_application_path;
};
Step::Status StepCopy::process() {
// set application path
- context_->application_path.set(
+ context_->pkg_path.set(
context_->root_application_path.get() / context_->pkgid.get());
- bf::path install_path = bf::path(context_->application_path.get());
-
- context_->pkg_path.set(install_path.string());
+ bf::path install_path = context_->pkg_path.get();
// FIXME: correctly order app's data.
// If there is 1 app in package, the app's data are stored in
assert(!context_->pkgid.get().empty());
// set application path
- context_->application_path.set(
+ context_->pkg_path.set(
context_->root_application_path.get() / context_->pkgid.get());
- // set paths
- install_path_ = context_->application_path.get();
- context_->pkg_path.set(install_path_.string());
+ install_path_ = context_->pkg_path.get();
// FIXME: correctly order app's data.
// If there is 1 app in package, app's data are stored in <pkg_path>/<app_id>
// If there are >1 apps in package, app's data are stored in <pkg_path>
// considering that multiple apps data are already separated in folders.
- if (context_->manifest_data.get()->uiapplication &&
- !context_->manifest_data.get()->uiapplication->next)
+ manifest_x *m = context_->manifest_data.get();
+ if ((m->uiapplication && !m->uiapplication->next && !m->serviceapplication) ||
+ (m->serviceapplication && !m->serviceapplication->next &&
+ !m->uiapplication))
install_path_ /= bf::path(context_->manifest_data.get()->mainapp_id);
backup_path_ = context_->pkg_path.get();
context_->manifest_data.set(mfx);
- // TODO(t.iwanek): fix me -> it shouldn't be here
- // set application path
- context_->application_path.set(
+ context_->pkg_path.set(
context_->root_application_path.get() / context_->pkgid.get());
- context_->pkg_path.set(context_->application_path.get());
-
LOG(DEBUG) << "Successfully parse tizen manifest xml";
return Status::OK;
namespace security {
Step::Status StepRegisterSecurity::precheck() {
- if (context_->application_path.get().empty()) {
- LOG(ERROR) << "application_path attribute is empty";
+ if (context_->pkg_path.get().empty()) {
+ LOG(ERROR) << "pkg_path attribute is empty";
return Step::Status::INVALID_VALUE;
}
- if (!boost::filesystem::exists(context_->application_path.get())) {
- LOG(ERROR) << "application_path ("
- << context_->application_path.get()
+ if (!boost::filesystem::exists(context_->pkg_path.get())) {
+ LOG(ERROR) << "pkg_path ("
+ << context_->pkg_path.get()
<< ") path does not exist";
return Step::Status::INVALID_VALUE;
}
Step::Status StepRegisterSecurity::process() {
if (!RegisterSecurityContextForApps(
- context_->pkgid.get(), context_->application_path.get(),
+ context_->pkgid.get(), context_->pkg_path.get(),
context_->manifest_data.get())) {
return Status::ERROR;
}
return Step::Status::INVALID_VALUE;
}
- // application_path is used in undo, but still, it might need to be checked
- if (context_->application_path.get().empty()) {
- LOG(ERROR) << "application_path attribute is empty";
- // TODO(p.sikorski) during standard process(), it does not need to exist
- // However, during "undo" application_path has to exist.
- // return Step::Status::INVALID_VALUE;
- }
-
return Step::Status::OK;
}
Step::Status StepRevokeSecurity::undo() {
if (!RegisterSecurityContextForApps(
- context_->pkgid.get(), context_->application_path.get(),
+ context_->pkgid.get(), context_->pkg_path.get(),
context_->manifest_data.get())) {
LOG(ERROR) << "Failure on re-installing security context for app "
<< context_->pkgid.get();
Step::Status StepUpdateSecurity::process() {
if (!RegisterSecurityContextForApps(
- context_->pkgid.get(), context_->application_path.get(),
+ context_->pkgid.get(), context_->pkg_path.get(),
context_->manifest_data.get())) {
return Status::ERROR;
}
Step::Status StepUpdateSecurity::undo() {
if (!RegisterSecurityContextForApps(
- context_->pkgid.get(), context_->application_path.get(),
+ context_->pkgid.get(), context_->pkg_path.get(),
context_->old_manifest_data.get())) {
return Status::ERROR;
}