1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #include "wgt/step/configuration/step_parse_recovery.h"
7 #include <common/paths.h>
8 #include <common/installer_context.h>
12 const char kResWgtPath[] = "res/wgt";
17 namespace configuration {
19 StepParseRecovery::StepParseRecovery(
20 common_installer::InstallerContext* context)
21 : StepParse(context, StepParse::ConfigLocation::RECOVERY, false) {
24 common_installer::Step::Status StepParseRecovery::process() {
25 (void) StepParse::process();
26 context_->pkg_path.set(
27 context_->root_application_path.get() / context_->pkgid.get());
31 common_installer::Step::Status StepParseRecovery::precheck() {
32 if (context_->root_application_path.get().empty()) {
33 LOG(ERROR) << "Root path of packages in not set";
34 return Status::INVALID_VALUE;
36 if (context_->pkgid.get().empty()) {
37 LOG(WARNING) << "Pkgid is not set. Parsing skipped";
43 } // namespace configuration