diff --git a/libs/rtemodel/include/RteInstance.h b/libs/rtemodel/include/RteInstance.h index 71660629b..257eab5ee 100644 --- a/libs/rtemodel/include/RteInstance.h +++ b/libs/rtemodel/include/RteInstance.h @@ -1589,10 +1589,17 @@ class RteFileInstance : public RteItemInstance */ std::string GetComponentUniqueID() const override; + /** + * @brief get partial component ID (without vendor) + * @param withBundle flag to include bundle in the ID + * @return partial component ID + */ + std::string GetPartialComponentID(bool withBundle) const override; + /** * @brief get component aggregate ID * @param withVersion - * @return + * @return component aggregate ID */ std::string GetComponentAggregateID() const override; diff --git a/libs/rtemodel/src/RteInstance.cpp b/libs/rtemodel/src/RteInstance.cpp index 90257f2af..6ba7530db 100644 --- a/libs/rtemodel/src/RteInstance.cpp +++ b/libs/rtemodel/src/RteInstance.cpp @@ -853,6 +853,10 @@ string RteFileInstance::GetComponentID(bool withVersion) const return m_componentAttributes.GetComponentID(withVersion); } +string RteFileInstance::GetPartialComponentID(bool withBundle) const +{ + return m_componentAttributes.GetPartialComponentID(withBundle); +} string RteFileInstance::GetComponentAggregateID() const { diff --git a/tools/projmgr/src/ProjMgrWorker.cpp b/tools/projmgr/src/ProjMgrWorker.cpp index aae3baee6..8f56bc090 100644 --- a/tools/projmgr/src/ProjMgrWorker.cpp +++ b/tools/projmgr/src/ProjMgrWorker.cpp @@ -2344,10 +2344,11 @@ bool ProjMgrWorker::CheckConfigPLMFiles(ContextItem& context) { regex_match(baseVersion, base, regEx); regex_match(updateVersion, update, regEx); if (base.size() == 4 && update.size() == 4) { + const string componentId = fi.second->GetPartialComponentID(true).empty() ? "" : " from component '" + fi.second->GetPartialComponentID(true) + "'"; auto GetUpdateMsg = [&](const string& severity) { - return "file '" + file + "' " + severity + + return severity + " for file '" + file + "'" + componentId + (!RteFsUtils::Exists(file + '.' + RteUtils::UPDATE_STRING + '@' + updateVersion) ? "; use --update-rte" : - "; merge content from update file, rename update file to base file and remove previous base file"); + ".\nMerge content from update file, rename update file to base file and remove previous base file"); }; if (base[1] != update[1]) { // major diff --git a/tools/projmgr/test/src/ProjMgrUnitTests.cpp b/tools/projmgr/test/src/ProjMgrUnitTests.cpp index 5f6e64a4e..36c407554 100644 --- a/tools/projmgr/test/src/ProjMgrUnitTests.cpp +++ b/tools/projmgr/test/src/ProjMgrUnitTests.cpp @@ -6692,11 +6692,11 @@ TEST_F(ProjMgrUnitTests, ConfigFilesUpdate) { // --no-update-rte std::vector> testDataVector1 = { - { "BaseUnknown", 0, "warning csolution: file '.*/startup_ARMCM3.c.base' not found; base version unknown", "missing base" }, - { "Patch", 0, "warning csolution: file '.*/startup_ARMCM3.c' update suggested; use --update-rte", "update suggested" }, - { "Minor", 0, "warning csolution: file '.*/startup_ARMCM3.c' update recommended; use --update-rte", "update recommended" }, - { "Major", 1, "error csolution: file '.*/startup_ARMCM3.c' update required; use --update-rte", "update required" }, - { "Missing", 1, "error csolution: file '.*/startup_ARMCM3.c' not found; use --update-rte", "missing file" }, + { "BaseUnknown", 0, "warning csolution: file '.*/startup_ARMCM3.c.base' not found; base version unknown", "missing base" }, + { "Patch", 0, "warning csolution: update suggested for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'; use --update-rte", "update suggested" }, + { "Minor", 0, "warning csolution: update recommended for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'; use --update-rte", "update recommended" }, + { "Major", 1, "error csolution: update required for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'; use --update-rte", "update required" }, + { "Missing", 1, "error csolution: file '.*/startup_ARMCM3.c' not found; use --update-rte", "missing file" }, }; for (const auto& [build, errCode, errMsg, status] : testDataVector1) { @@ -6716,9 +6716,9 @@ TEST_F(ProjMgrUnitTests, ConfigFilesUpdate) { // --update-rte std::vector> testDataVector2 = { { "BaseUnknown", 0, "" }, - { "Patch", 0, "warning csolution: file '.*/startup_ARMCM3.c' update suggested; merge content from update file, rename update file to base file and remove previous base file" }, - { "Minor", 0, "warning csolution: file '.*/startup_ARMCM3.c' update recommended; merge content from update file, rename update file to base file and remove previous base file" }, - { "Major", 1, "error csolution: file '.*/startup_ARMCM3.c' update required; merge content from update file, rename update file to base file and remove previous base file" }, + { "Patch", 0, "warning csolution: update suggested for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'.\nMerge content from update file, rename update file to base file and remove previous base file" }, + { "Minor", 0, "warning csolution: update recommended for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'.\nMerge content from update file, rename update file to base file and remove previous base file" }, + { "Major", 1, "error csolution: update required for file '.*/startup_ARMCM3.c' from component 'Device:Startup&RteTest Startup'.\nMerge content from update file, rename update file to base file and remove previous base file" }, { "Missing", 0, "" }, };