When in RecoverInstall mode and ReadonlyUpdateInstall in RecoverUpgrade mode
Fix the problem of misusing the backup manifest in the recover parser plugin
Change-Id: I569b9c96c457ba39ec1bb482cd21440f52980563
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
}
}
+bool IsNeedToUseBackupManifest(ci::InstallerContext* context) {
+ ci::RequestType type = context->recovery_info.get().recovery_file->type();
+ if (type == ci::RequestType::Update || type == ci::RequestType::Delta ||
+ type == ci::RequestType::MountUpdate)
+ return true;
+
+ return false;
+}
+
} // namespace
namespace common_installer {
context_->is_readonly_package.get()))
/ context_->pkgid.get();
xml_path += ".xml";
- context_->xml_path.set(GetBackupPathForManifestFile(xml_path));
+ if (IsNeedToUseBackupManifest(context_))
+ xml_path = GetBackupPathForManifestFile(xml_path);
+ context_->xml_path.set(xml_path);
return true;
}