#include <tzplatform_config.h>
#include <string>
+#include <cstring>
#include "common/paths.h"
#include "common/external_storage.h"
namespace bf = boost::filesystem;
namespace bs = boost::system;
+namespace {
+
+const char kInternalOnly[] = "internal-only";
+
+} // namespace
+
namespace common_installer {
namespace filesystem {
return Status::OK;
}
+Step::Status StepMoveInstalledStorage::precheck() {
+ if (context_->manifest_data.get()->installlocation == nullptr) {
+ LOG(ERROR) << "Cannot get installlocation value";
+ return Status::INVALID_VALUE;
+ }
+ if (!strcmp(context_->manifest_data.get()->installlocation, kInternalOnly)) {
+ LOG(ERROR) << "This package is interanl-only";
+ return Status::OPERATION_NOT_ALLOWED;
+ }
+ return Status::OK;
+}
+
void StepMoveInstalledStorage::SetTepPaths() {
old_location_ = context_->manifest_data.get()->tep_name;
if (context_->is_move_to_external.get()) {