#include <rpk_manifest_handlers/dependencies_handler.h>
#include <rpk_manifest_handlers/package_handler.h>
+#include <chrono>
+#include <string>
#include <common/installer_context.h>
#include <common/step/step.h>
if (!FillDependencyInfo(manifest))
return false;
+ if (!FillInstallationInfo(manifest))
+ return false;
+
return true;
}
return true;
}
+bool StepParseRpkManifest::FillInstallationInfo(manifest_x* manifest) {
+ manifest->root_path = strdup(
+ (context_->root_application_path.get() / manifest->package).c_str());
+ manifest->installed_time =
+ strdup(std::to_string(std::chrono::system_clock::to_time_t(
+ std::chrono::system_clock::now())).c_str());
+ return true;
+}
+
} // namespace configuration
} // namespace rpk
bool FillAuthorInfo(manifest_x* manifest);
bool FillDescriptionInfo(manifest_x* manifest);
bool FillDependencyInfo(manifest_x* manifest);
+ bool FillInstallationInfo(manifest_x* manifest);
std::unique_ptr<rpk::parse::RPKConfigParser> parser_;
ManifestLocation manifest_location_;