From 04768092803832cd71e58283ee946f9ddf7c15fc Mon Sep 17 00:00:00 2001 From: Jen-Tse Huang Date: Fri, 27 Mar 2026 14:47:25 +0100 Subject: [PATCH 1/2] Extend PLM status messages with parent component ID --- libs/rtemodel/include/RteInstance.h | 9 ++++++++- libs/rtemodel/src/RteInstance.cpp | 4 ++++ tools/projmgr/src/ProjMgrWorker.cpp | 5 +++-- tools/projmgr/test/src/ProjMgrUnitTests.cpp | 16 ++++++++-------- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/libs/rtemodel/include/RteInstance.h b/libs/rtemodel/include/RteInstance.h index 71660629b..6cce04417 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 + */ + virtual 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 d57494d07..fcb6f4200 100644 --- a/tools/projmgr/src/ProjMgrWorker.cpp +++ b/tools/projmgr/src/ProjMgrWorker.cpp @@ -2341,10 +2341,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 437d16b4f..27ad8b9aa 100644 --- a/tools/projmgr/test/src/ProjMgrUnitTests.cpp +++ b/tools/projmgr/test/src/ProjMgrUnitTests.cpp @@ -6691,11 +6691,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) { @@ -6715,9 +6715,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, "" }, }; From ed664294e280a1243ee052b3384cbc1bd49d94ae Mon Sep 17 00:00:00 2001 From: Jen-Tse Huang Date: Fri, 27 Mar 2026 16:22:55 +0100 Subject: [PATCH 2/2] Remove redundant code --- libs/rtemodel/include/RteInstance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/rtemodel/include/RteInstance.h b/libs/rtemodel/include/RteInstance.h index 6cce04417..257eab5ee 100644 --- a/libs/rtemodel/include/RteInstance.h +++ b/libs/rtemodel/include/RteInstance.h @@ -1594,7 +1594,7 @@ class RteFileInstance : public RteItemInstance * @param withBundle flag to include bundle in the ID * @return partial component ID */ - virtual std::string GetPartialComponentID(bool withBundle) const override; + std::string GetPartialComponentID(bool withBundle) const override; /** * @brief get component aggregate ID